On Wednesday, March 07, 2012 6:23:42 am Martin Gregorie wrote:

> Question
> ========
> Is it possible to reinstate 'template1' and all its works without
> reinitialising the database from scratch. It was suggested to me that
> running "initdb" might fix it while leaving my data in place though my
> source was uncertain about its success. Would this work or is there a
> better way to restore 'template1' in a populated database system?


Was reading through this again and got to wondering, is pg_dumpall really 
necessary? Do you have multiple databases you want to dump at once? If not a 
plain pg_dump against a particular database would work. There is also the 
advantage that if you use pg_dump -Fc you can use pg_restore. My use case for 
pg_dumpall is pg_dumpall -g to get the global information only from the 
cluster. 
I then use pg_dump for individual databases. You would still want to recreate a 
template1 because quite a few tools expect it to be there.



-- 
Adrian Klaver
adrian.kla...@gmail.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to