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