Re: Details for planned template0/template1 change

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Details for planned template0/template1 change
Date: 2000-11-13 17:38:13
Message-ID: 9970.974137093@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
>> 5. pg_dump should ignore objects with OID <= lastsysoid of the target
>> database.

> I think it should ignore objects with OID <= lastsysoid of template0; then
> when it does a restore, it should use 'WITH TEMPLATE template0'.

Restores will be with template template0 anyway, but it seems to me that
dump should look to lastsysoid of the database being dumped (sorry if my
term "target database" confused you). I'm not sure whether there's any
value in altering lastsysoid of individual databases to suppress dumping
of some items therein, but it can't hurt to retain the flexibility.

> BTW: are there any nice ways to:
> (ie. shutdown a single database).

Not at the moment.

> Sounds fine; but we need to use lastsysoid of template0 in pg_dump. Consider:

> - add function foo() to template1, OID=100000
> - create db1 (inherits foo())
> - update function foo() in template1, and also update it in db1. New OID >
> 100000
> - dump db1 - will dump foo().
> - restore db1 using template1->crash

No, because you aren't ever going to restore db1 using template1 as
template. That's specifically what template0 is for.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2000-11-13 17:40:54 Re: Details for planned template0/template1 change
Previous Message Tom Lane 2000-11-13 17:33:52 Re: UUNET socket-file-location patch