On Thu, Jan 5, 2017 at 7:10 PM, Amit Kapila <amit.kapil...@gmail.com> wrote: > Memory contexts used in catch block also doesn't seem to be marked as > volatile, you might want to try by marking them as volatile. Also, it > might worth trying it on some other system to see if you are by any > chance hitting the problem similar to what Tom has faced.
If a variable is modified within PG_TRY and then referenced in PG_CATCH it needs to be marked as volatile to be strictly in conformance with POSIX. This also ensures that any compiler does not do any stupid optimizations with those variables in the way they are referenced and used. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers