Re: Interesting glitch in autovacuum

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Interesting glitch in autovacuum
Date: 2008-09-11 01:33:45
Message-ID: 20080911013345.GM4399@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> BTW, I did a quick look at all the uses of RecentGlobalXmin in the back
> branches, and I think we might be all right before 8.2. The older
> branches do in fact init RecentGlobalXmin to InvalidTransactionId,
> and the only thing they use it for is "is this tuple dead to everyone"
> tests. Since InvalidTransactionId compares older than anything else,
> the only consequence of not having set it is overly-conservative
> decisions not to mark tuples killed. So unless you see a problem I
> missed, I think we only have an issue-worth-fixing in 8.2 and 8.3.

Actually, 8.2 initializes it to InvalidTransactionId too, so it doesn't
seem like there's a problem there either. Since the problem stems from
using it as initializer for the Min() calculation, there's no actual bug
on 8.2 either. The bug only appeared on 8.3 when the initializer was
changed. And given that there's no HOT in 8.2, then there's no danger
of misusing it in page pruning either.

Still, I produced a patch to 8.2, but given that I'm not sure if it's
worth applying.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment Content-Type Size
ensure-recentglobal-82.patch text/x-diff 4.1 KB
ensure-recentglobal-83.patch text/x-diff 8.3 KB
ensure-recentglobal-head.patch text/x-diff 10.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2008-09-11 01:44:11 Re: Proposed patch: make SQL interval-literal syntax work per spec
Previous Message Tom Lane 2008-09-11 00:21:27 Re: Proposed patch: make SQL interval-literal syntax work per spec