Re: [HACKERS] Odd behavior with PG_TRY

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Odd behavior with PG_TRY
Дата
Msg-id CAB7nPqS8mVqFd9mw84UbaofaiXrfd0pgRfeZrhbL8DMdHJayTA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Odd behavior with PG_TRY  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: [HACKERS] Odd behavior with PG_TRY  (Kevin Grittner <kgrittn@gmail.com>)
Список pgsql-hackers
On Thu, Jan 5, 2017 at 7:10 PM, Amit Kapila <amit.kapila16@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] Parallel Append implementation
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] postgres_fdw : altering foreign table not invalidatingprepare statement execution plan.