projects
/
2ndquadrant_bdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd46096
)
bdr: WAL log bdr sequences correcly
author
Petr Jelinek
<pjmodos@pjmodos.net>
Mon, 15 Sep 2014 15:56:14 +0000
(17:56 +0200)
committer
Petr Jelinek
<pjmodos@pjmodos.net>
Mon, 15 Sep 2014 15:56:14 +0000
(17:56 +0200)
bdr_seq.c
patch
|
blob
|
blame
|
history
diff --git
a/bdr_seq.c
b/bdr_seq.c
index 57c6bbb3f68091ece12561ea4ad6a8366730198d..90860e79ecdcc58f0308c1eab1f41eefe7b3eae2 100644
(file)
--- a/
bdr_seq.c
+++ b/
bdr_seq.c
@@
-1204,6
+1204,8
@@
bdr_sequence_alloc(PG_FUNCTION_ARGS)
if (wakeup)
bdr_sequencer_wakeup();
+ next = result + log - 1;
+
elm->last = result;
elm->cached = result;
elm->last_valid = true;
@@
-1239,7
+1241,7
@@
bdr_sequence_alloc(PG_FUNCTION_ARGS)
/* Now update sequence tuple to the intended final state */
seq->last_value = elm->last; /* last fetched number */
seq->is_called = true;
- seq->log_cnt = log; /* how much is logged */
+ seq->log_cnt = log
-1
; /* how much is logged */
result = elm->last;