A small mistake in the initial latestCompletedXid idea - Mailing list pgsql-hackers

From Florian G. Pflug
Subject A small mistake in the initial latestCompletedXid idea
Date
Msg-id 46E7F4AF.6030401@phlo.org
Whole thread Raw
Responses Re: A small mistake in the initial latestCompletedXid idea
List pgsql-hackers
Hi

When I initially proposed to use the latest *committed* xid as the xmax instead
of ReadNewTransactionId(), I believed that this would cause tuples created by a
later aborted transaction not to be vacuumed until another transaction (with a
higher xid) commits later. The idea was therefore modified to store the latest
*completed* xid, instead of the latest committed one.

I just realized that my fear was unjustified. AFAICS, VACUUM will aways remove
tuples created by aborted transactions, even if the xid is >= OldestXmin.

Therefore, I suggest that we rename latestCompletedXid to latestCommittedXid,
and update it only on commits. Admittedly, this won't bring any measurable
performance benefit in itself (it will slightly reduce the average snapshot
size, though), but not doing so might stand in the way of possible future
optimizations in that area.

I'll submit a patch to the patches list shortly.

greetings, Florian Pflug



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: HOT breaks CLUSTER, a bit
Next
From: Tom Lane
Date:
Subject: Re: Preparation for PostgreSQL releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20