Re: Unhappy thoughts about pg_dump and objects inherited from template1 - Mailing list pgsql-hackers

From Philip Warner
Subject Re: Unhappy thoughts about pg_dump and objects inherited from template1
Date
Msg-id 3.0.5.32.20001111152611.00b0dc80@mail.rhyme.com.au
Whole thread Raw
In response to Re: Unhappy thoughts about pg_dump and objects inherited from template1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 01:21 10/11/00 -0500, Tom Lane wrote:
>
>You're right, it's *a* solution, but it'd involve a lot of tedious work.
>It's not just adding a column to all the system tables.  If I interpret
>correctly what Mark and Gene are concerned about, it'd also mean
>changing the code so that any update to a system-table row would
>automatically clear the "I'm a standard item" flag. 

I appreciate that (I think) I have said the opposite before, but I'd
actually vote against this; once something is defined as a 'system item',
it should not be the job of pg_dump to restore it, even if a DBA has
changed it. This is the correct behaviour since system objects will, almost
by definition, depend on the version of PG, and the dumped database needs
to be as close as possible to version-agnostic. In fact, the reason for the
restore may be to go back to a vanilla system after corrupting the old
system catalog...

As previously observed, we have three things to restore:

1. The base system. This is done by initdb, which creates template0/1.

2. The local extensions to the template database.

3. The local databases. We need to be able to restore these one at a time
in the presence of a localized template1 as well as in the presence of a
vanilla template1.

Implementing template0 will suffice for the moment, and maybe later we need
to consider some kind of 'isSystemObject' flag.



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: Unhappy thoughts about pg_dump and objects inherited from template1
Next
From: selkovjr@mcs.anl.gov
Date:
Subject: Re: Unhappy thoughts about pg_dump and objects inherited from template1