Re: XID-assigned idle transactions affect vacuum's job. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: XID-assigned idle transactions affect vacuum's job.
Date
Msg-id 11866.1521556575@sss.pgh.pa.us
Whole thread Raw
In response to XID-assigned idle transactions affect vacuum's job.  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
Masahiko Sawada <sawada.mshk@gmail.com> writes:
> I think that to decide which deleted tuples must be preserved we don't
> need to care about backend PGXACT.xid but must care about PGXACT.xmin.

Surely this is wrong?  Assume that the XID in question is the oldest one
visible in the ProcArray (if it isn't, the question is moot anyway).
If we ignore it while setting VACUUM's cutoff, then if we come to a
tuple bearing that XID, we will think the transaction involved is
aborted (since it's not marked as committed) and proceed to remove the
tuple.

As Amit remarks, the fact that that XID will constrain the XMINs of other
open transactions means you'd usually not get any win anyway.  But AFAICS,
this proposal is incorrect even without that.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: [PoC PATCH] Parallel dump to /dev/null
Next
From: Tom Lane
Date:
Subject: Re: configure's checks for --enable-tap-tests are insufficient