Re: Details for planned template0/template1 change
От | Philip Warner |
---|---|
Тема | Re: Details for planned template0/template1 change |
Дата | |
Msg-id | 3.0.5.32.20001114042804.033d98e0@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | Details for planned template0/template1 change (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Details for planned template0/template1 change
|
Список | pgsql-hackers |
At 11:48 13/11/00 -0500, Tom Lane wrote: > >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'. At least this should be an option. >I think that >a dballowconn flag might have other uses anyway, such as temporarily >disallowing new connections to a database you are doing major work in. eg. while a restore script is running... BTW: are there any nice ways to: - set the flag - kick current users off without corrupting memory (ie. shutdown a single database). >lastsysoid will probably always be the same for all databases in an >installation, since they'll all inherit the value from template0 or >template1. However, there is the possibility of changing it to exclude >some items from backup, so I'm continuing to treat it as a per-database >value. 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 However, dumping based oi lastsysoid of template0, then restoring based on template0 works... Otherwise sounds good! ---------------------------------------------------------------- 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 по дате отправления: