Search Postgresql Archives

Re: xmax not zero?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2023-10-30 at 13:53 +0100, Guillaume Lelarge wrote:
> Le lun. 30 oct. 2023 à 13:45, Luca Ferrari <fluca1978@xxxxxxxxx> 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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux