Re: xmax not zero?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: xmax not zero?
Дата
Msg-id b8e727ca85abb6e36a946c39cd4b1789110390d4.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: xmax not zero?  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-general
On Mon, 2023-10-30 at 13:53 +0100, Guillaume Lelarge wrote:
> Le lun. 30 oct. 2023 à 13:45, Luca Ferrari <fluca1978@gmail.com> a écrit :
> > I have a table that presents an xmax not zeroed outside of a
> > transaction block, and it does not look normal to me.
> > I have no idea about how this happened, it is one of my "toy"
> > PostgreSQL virtual machines.
> > But how to dig an better understand why there is an xmax with a non-zero value?
>
> There are many reasons for a non-zero value: row updated or deleted in a rollbacked
> transaction, row updated or deleted in a current transaction, row locked by a
> SELECT FOR UPDATE, and perhaps others I don't remember right now.

INSERT ... ON CONFLICT could also cause this.
As long as the transaction corresponding to the "xid" is marked as "aborted",
that number is not valid and is treated like a 0.

Yours,
Laurenz Albe



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

Предыдущее
От: Paul Förster
Дата:
Сообщение: Re: pg_checksums?
Следующее
От: Ron
Дата:
Сообщение: Re: pg_checksums?