From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Plans for 8.2? |
Date: | 2006-01-13 15:18:38 |
Message-ID: | 25207.1137165518@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> writes:
> On Thu, Jan 12, 2006 at 07:46:18PM -0500, Tom Lane wrote:
>> The comment's "have to" is an overstatement. The transaction would be
>> treated as crashed anyway, it's just that this is a convenient place to
>> make pg_clog a bit cleaner. I'm not real sure why we bother, actually.
> Because that's what makes PostgreSQL such a reliable
> product. You follow your intuition and taste and bother
> doing cleanup even if you cannot immediately tell whether
> it's *really* needed.
Well, this is not a correctness issue. If it were, XactLockTableWait
would be quite the wrong place for it, because there's no guarantee
anyone will ever do XactLockTableWait for any particular transaction ID.
In fact, now that I look at it, I'm pretty well convinced this is dead
code: we only ever wait for XIDs that are known to have been alive in
the recent past, ie, within the lifespan of the current backend. So the
case should never occur ... unless possibly in the microseconds before
we receive SIGQUIT from the postmaster because the other guy crashed,
and in that situation trying to issue a write on pg_clog is probably
not the brightest action to be taking anyway. This could easily
represent a net minus for reliability, not a plus, if it increases the
risk of pg_clog getting corrupted during a crash sequence.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ottó Havasvölgyi | 2006-01-13 15:24:18 | Moving PostgreSQL data directory on Windows |
Previous Message | Joshua D. Drake | 2006-01-13 15:05:53 | Re: Plans for 8.2? |