Search Postgresql Archives

Re: Command to reset entire PgSQL cluster?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/10/2015 11:02 AM, Felipe Gasper wrote:
On 2/10/15 12:57 PM, David G Johnston wrote:
Felipe Gasper wrote
Is there a quick way to reset a PgSQL cluster to its pristine
state--i.e., to what initdb gives but preserving configuration
customizations?

Not that I am aware of.

If you describe your use-case then meaningful suggestions could be offered.


We have a lot of code that tests interaction with a PgSQL cluster on the same server that has a live production cluster. To keep the testing environment separate from production, we create a PgSQL cluster in a temp directory then run tests against that.

This, as you can imagine, is pretty expensive to set up each time … initdb is not fast! It would be nice if we could just create a single test PgSQL cluster then wipe it clean at the end of each test.

use a file system, like zfs, that supports snapshots. initdb the first time, configure your system, then snapshot it. each successive time, stop postgres, revert the snapshot, restart postgres.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux