Re: [HACKERS] Unsafe coding in ReorderBufferCommit()

2015-01-26 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2015-01-23 16:47:30 -0500, Tom Lane wrote: There are at least two bugs in reorderbuffer.c's ReorderBufferCommit(): Thanks for fixing these! Unfortunately there's more - we'll currently do bad things if transaction commit fails. At the very

Re: [HACKERS] Unsafe coding in ReorderBufferCommit()

2015-01-26 Thread Andres Freund
Hi Tom, On 2015-01-23 16:47:30 -0500, Tom Lane wrote: There are at least two bugs in reorderbuffer.c's ReorderBufferCommit(): Thanks for fixing these! Unfortunately there's more - we'll currently do bad things if transaction commit fails. At the very least the (sub-)transaction begin commands

[HACKERS] Unsafe coding in ReorderBufferCommit()

2015-01-23 Thread Tom Lane
There are at least two bugs in reorderbuffer.c's ReorderBufferCommit(): 1. Although iterstate is modified within the PG_TRY segment and referenced within the PG_CATCH segment, it is not marked volatile. This means that its value upon reaching the PG_CATCH segment is indeterminate. In practice,