Re: Corrupt database? 8.1/FreeBSD6.0 - Mailing list pgsql-general

From Tom Lane
Subject Re: Corrupt database? 8.1/FreeBSD6.0
Date
Msg-id 5984.1168611383@sss.pgh.pa.us
Whole thread Raw
In response to Re: Corrupt database? 8.1/FreeBSD6.0  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Corrupt database? 8.1/FreeBSD6.0  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Hmm, that would mean an ANALYZE got done on template0, no? ... but
> AFAICT process_whole_db() always sets analyze=false.

The thing that's bothering me is that I don't see any certainty that
template0 is only processed via the process_whole_db() path.  In the
8.1 code, the existence of a stats-collector DB entry causes a DB
to enter the normal round-robin processing path ... and I'm wondering
whether the mere act of autovac connecting due to process_whole_db()
doesn't cause such an entry to come into existence.  IOW once template0
has been vacuumed once for anti-wraparound, it starts receiving normal
vacuums, which will cause their own XIDs to appear in pg_statistic
at least, and then you're at risk: if autovacuuming stops for awhile,
those XIDs will fall below the pg_clog horizon because template0 is
not considered when determining the cutoff.

8.2's approach is saner but I think we need some sort of band-aid
in the 8.1 branch...

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Corrupt database? 8.1/FreeBSD6.0
Next
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] Checkpoint request failed on version 8.2.1.