bdr: calling check_sequencer_wakeup() now on UPDATE conflict
authorChristian Kruse <cjk@defunct.ch>
Mon, 31 Mar 2014 10:26:33 +0000 (12:26 +0200)
committerAndres Freund <andres@anarazel.de>
Thu, 3 Jul 2014 15:55:22 +0000 (17:55 +0200)
After reading code it seems to be no problem calling
check_sequencer_wakeup() on UPDATE conflict; thus we do it.

contrib/bdr/bdr_apply.c

index c18f7957eaf7a0098dcb02d7db822e268b2f7b84..62393ca7f37b685d30ec8c295ad7129639c24f04 100644 (file)
@@ -533,6 +533,8 @@ process_remote_update(StringInfo s)
        tuple_to_stringinfo(&s_key, RelationGetDescr(idxrel), old_key);
        bdr_count_update_conflict();
 
+       check_sequencer_wakeup(rel);
+
        ereport(ERROR,
                (errcode(ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION),
                 errmsg("CONFLICT: could not find existing tuple for pkey %s", s_key.data)));
@@ -540,7 +542,6 @@ process_remote_update(StringInfo s)
        /*
         * idxrel and rel will be closed by context cleanup, s_key will be
         * cleaned up as well
-        * TODO but what about check_sequencer_wakeup()?
         */
    }