Re: Incomplete freezing when truncating a relation during vacuum

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Incomplete freezing when truncating a relation during vacuum
Date: 2013-12-01 23:08:22
Message-ID: 20131201230822.GA778@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-12-01 18:02:27 -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On 2013-12-01 17:15:31 -0500, Tom Lane wrote:
> >> Is there really a significant risk of clog access errors due to this bug?
> >> IIUC, the risk is that tuples in pages that vacuum skips due to being
> >> all-visible might not be frozen when intended.
>
> > Unfortunately it's not actually too hard to hit due to following part of the
> > code in vacuumlazy.c:
>
> > /*
> > * If we're not scanning the whole relation to guard against XID
> > * wraparound, it's OK to skip vacuuming a page. The next vacuum
> > * will clean it up.
> > */
>
> Ah. So it's only been *seriously* broken since commit bbb6e559c, ie 9.2.

Well, even before that crash recovery/replication didn't necessarily
preserve the hint bits. Even more so if somebody dared to set
full_page_writes=off.

I personally think full_page_writes=off should conflict with wal_level
!= minimal, btw, but I don't see much chance of gaining acceptance for
that.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-12-01 23:56:19 Draft release notes for 9.3.2
Previous Message Tom Lane 2013-12-01 23:02:27 Re: Incomplete freezing when truncating a relation during vacuum