Re: restoring a database to its initial state - Mailing list pgsql-general

From Tom Lane
Subject Re: restoring a database to its initial state
Date
Msg-id 2473.1268497254@sss.pgh.pa.us
Whole thread Raw
In response to Re: restoring a database to its initial state  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: restoring a database to its initial state  (Manlio Perillo <manlio.perillo@gmail.com>)
List pgsql-general
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2010/3/13 Manlio Perillo <manlio.perillo@gmail.com>:
>> Usually when I need to restore a database to its initial state, what I
>> do is to simply drop it, and then re-create it.
>> However on a shared hosting this is not possible.

> Usually people use a install and a uninstall scripts. First creates
> dbobjects, second removes objects.

"pg_dump --clean" can help with creating an uninstall script.

            regards, tom lane

pgsql-general by date:

Previous
From: Gordon Shannon
Date:
Subject: unexplained autovacuum to prevent wraparound
Next
From: Lacey Powers
Date:
Subject: Re: ERROR: Package compat-postgresql-libs-4-1PGDG.rhel4.i386.rpm is not signed