Re: [HACKERS] [BUGS] BUG #6748: sequence value may be conflict in some cases

2012-07-24 Thread Tom Lane
I wrote: The tuple in buffers has log_cnt = 1, is_called = false, but the initial XLOG_SEQ_LOG record shows log_cnt = 0, is_called = true. So if we crash at this point, after recovery it looks like one nextval() has already been done. However, AlterSequence generates another XLOG_SEQ_LOG

Re: [HACKERS] [BUGS] BUG #6748: sequence value may be conflict in some cases

2012-07-23 Thread Tom Lane
meixiangm...@huawei.com writes: [ freshly-created sequence has wrong state after crash ] I didn't believe this at first, but sure enough, it fails just as described if you force a crash between the first and second nextval calls for the sequence. This used to work ... The change that broke it