Re: Details for planned template0/template1 change
От | Tom Lane |
---|---|
Тема | Re: Details for planned template0/template1 change |
Дата | |
Msg-id | 9970.974137093@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Details for planned template0/template1 change (Philip Warner <pjw@rhyme.com.au>) |
Ответы |
Re: Details for planned template0/template1 change
|
Список | pgsql-hackers |
Philip Warner <pjw@rhyme.com.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
В списке pgsql-hackers по дате отправления: