Re: [WIP] Add relminxid column to pg_class - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: [WIP] Add relminxid column to pg_class
Date
Msg-id 20060409204320.GA16673@surnet.cl
Whole thread Raw
In response to Re: [WIP] Add relminxid column to pg_class  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [WIP] Add relminxid column to pg_class  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Alvaro Herrera wrote:
> Tom Lane wrote:
>
> > I'd argue that you should do nothing, ie, dropping a table should never
> > affect datminxid.  The proper interpretation of the pg_database columns
> > is that we guarantee that all XID's in the database are *at least* thus-
> > and-so, not that the minimum is exact.
>
> Ok, this new patch does this.  It allowed to simplify some code a bit,
> and works wonderfully.

BTW, I forgot to mention that I intend to apply this patch later today,
regardless of whatever solution we may decide for the problem below; we
can add it later, and it certainly is a corner case.

> The solution seems to be to vacuum the whole database right after
> cloning.  Or to forcibly set the pg_class value to the current
> TransactionId, without vacuuming (which should be fine, because the
> template database was frozen).

Another possibility is to have autovac vacuum all databases, including
those marked not connectable.  While this won't solve the problem for
those not running autovac, chances are that people doing so will be less
with each release.

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

pgsql-patches by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: Couple of minor fixes
Next
From: Tom Lane
Date:
Subject: Re: [WIP] Add relminxid column to pg_class