A small mistake in the initial latestCompletedXid idea

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема A small mistake in the initial latestCompletedXid idea
Дата
Msg-id 46E7F4AF.6030401@phlo.org
обсуждение исходный текст
Ответы Re: A small mistake in the initial latestCompletedXid idea  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: HOT breaks CLUSTER, a bit
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Preparation for PostgreSQL releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20