Re: [GENERAL] xmin increasing within a transaction block?

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: [GENERAL] xmin increasing within a transaction block?
Дата
Msg-id CAKoxK+6K3gjONB6qkviTa-==b1XWcvx5Lu11zKRHFYydh860fg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] xmin increasing within a transaction block?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Nov 6, 2017 at 3:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> Luca Ferrari wrote:
>>> Why is xmin greater than the current transaction id (and most notably
>>> not "fixed")?
>
>> Something is using subtransactions there.  My first guess would be that
>> there are triggers with EXCEPTION blocks, but your example doesn't show
>> any.  Or maybe you have event triggers.
>
> I can reproduce the example if I "\set ON_ERROR_ROLLBACK on" in psql.
>


Shame on me, I did forgot to have enabled that in my ~/.psqlrc file
(and did not hit an error within the transaction block to see it was
aborting). And in fact, the manual page for psql reports that
ON_ERROR_ROLLBACK:

The error rollback mode works by issuing an implicit SAVEPOINT for you,
just before each command that is in a transaction block, and
then rolling back to the savepoint if the command fails.

Sorry for the noise.
Thanks,
Luca


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Sachin Kotwal
Дата:
Сообщение: Re: [GENERAL] Naming conventions for column names
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: [GENERAL] Naming conventions for column names