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 20060410035711.GA28647@surnet.cl
Whole thread Raw
In response to Re: [WIP] Add relminxid column to pg_class  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [WIP] Add relminxid column to pg_class  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:

> I see a workaround though: it *is* OK for VACUUM FREEZE to set datminxid
> = FrozenXid if (1) it's been able to freeze all the tables and (2) it's
> running in a standalone backend.  This rule would let us freeze
> template0 during initdb.
>
> There's still a question of where/when to worry about marking a database
> unfrozen.  Perhaps a suitably cheap, conservative approximation would be
> to cause any new connection to a frozen database to immediately mark it
> unfrozen in pg_database.  (I'm not sure if this works conveniently for
> initdb's processing though --- we might want to fudge a bit depending on
> whether we're running standalone.)

initdb never connects to template0, so I think it should work.  We just
need to add an additional step to initdb to run the vacuum freeze.

What do you think of making vacuum a no-op on a table that has datminxid
= FrozenXid?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [WIP] Add relminxid column to pg_class
Next
From: Tom Lane
Date:
Subject: Re: [WIP] Add relminxid column to pg_class