Re: Corrupt database? 8.1/FreeBSD6.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Jeff Amiel <becauseimjeff(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Corrupt database? 8.1/FreeBSD6.0
Date: 2007-01-12 14:16:23
Message-ID: 5984.1168611383@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-01-12 14:28:51 Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Previous Message Alvaro Herrera 2007-01-12 13:55:52 Re: Corrupt database? 8.1/FreeBSD6.0

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-01-12 14:28:51 Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Previous Message Mario Weilguni 2007-01-12 14:07:32 Re: to_char not IMMUTABLE?

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-01-12 14:38:07 Re: Corrupt database? 8.1/FreeBSD6.0
Previous Message Dave Page 2007-01-12 14:08:49 Allow dumping of roles or tablespaces