Re: Template zero xid issue - Mailing list pgsql-general

From Tom Lane
Subject Re: Template zero xid issue
Date
Msg-id 1018.1186427466@sss.pgh.pa.us
Whole thread Raw
In response to Re: Template zero xid issue  ("Keaton Adams" <kadams@mxlogic.com>)
Responses Re: Template zero xid issue  ("Keaton Adams" <kadams@mxlogic.com>)
List pgsql-general
"Keaton Adams" <kadams@mxlogic.com> writes:
> Do I have this right?

It's not clear.  You didn't answer the question about whether you were
running autovac, but even if you were I'm not sure why you got the
complaint about template0.  AFAICS the only way for template0 to be
installed as oldest_datname is if vac_truncate_clog() is invoked in
template0, allowing it to be the initial selection before the loop
starts.  Which could happen if autovac is on, since it will try to
vacuum template0, and in 8.1.4 it neglects to use the FREEZE option.
But even then, if we just finished a DB-wide vacuum on template0,
it should not have had the oldest datfrozenxid; and certainly not one
old enough to provoke complaints.

Actually there's a whole lot that isn't clear about this.  Your first
report showed a warning --- not an error --- about template0, so it's
not at all clear that the "database system is shutting down" messages
had anything to do with that at all.  And you later posted some queries
that weren't drawing any such message.  What was the exact sequence of
events here?

Alvaro: you have any thoughts about this?  I'm suspicious that we ought
to change 8.1's vac_truncate_clog() to not include the current database
automatically, since it might be not-datallowconn; but I don't see how
that potential bug could actually be exposed as a fault.

            regards, tom lane

pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: more select-for-update questions
Next
From: "Jasbinder Singh Bali"
Date:
Subject: Re: new line in psotgres