From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> |
Cc: | "Bruce Momjian" <bruce(at)momjian(dot)us>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: HOT documentation README |
Date: | 2007-09-12 16:52:01 |
Message-ID: | 23910.1189615921@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
"Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
> On 9/12/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> XXX doesn't the above completely break the anti-wraparound guarantees?
>> And why couldn't we avoid the problem by pruning the previous tuple,
>> which is surely dead?
> We preserve anti-wraparound guarantees by not letting the relfrozenxid
> advance past the minimum of cut-off xid and xmin/xmax of not-yet-frozen
> tuples. Given that this is required to address corner case of DEAD tuple
> following a RD tuple, the final relfrozenxid would be very close to the
> cut-off xid. Isn't it ?
> We could have actually pruned the preceding RD tuples (as we do in
> vacuum full), but we were worried about missing some corner case
> where someone may still want to follow the chain from the RD tuple.
This seems all wrong to me. We'd only be considering freezing a tuple
whose xmin precedes the global xmin. If it has a predecessor, that
predecessor has xmax equal to this one's xmin, therefore also preceding
global xmin, therefore it would be seen as DEAD not RECENTLY_DEAD.
So we should never need to freeze a tuple that isn't the start of its
HOT chain.
Also, if you find a DEAD tuple after a RECENTLY_DEAD one, you can
certainly prune both, because what this tells you is that both tuples
are in fact dead to all observers.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Florian G. Pflug | 2007-09-12 17:54:17 | Use latestCompletedXid to slightly optimize TransactionIdIsInProgress |
Previous Message | Tom Lane | 2007-09-12 16:37:45 | Re: HOT documentation README |