On Thu, Jan 19, 2006 at 04:54:21PM -0600, Jim C. Nasby wrote:
> You could also do this by doing a filesystem copy of $PG_DATA (with
> postgresql shut down), and then restoring that copy after your test. If
> you used rsync (or something that allowed filesystem snapshots) this
> probably wouldn't be very painful.

Hmmm...wouldn't using a template database work the same way?  Doesn't
CREATE DATABASE simply do a recursive copy of the template database's
directory?  I'm thinking you could

1. Set up the initial test conditions in some database.  This could
   include creating unanalyzed tables in dire need of vacuuming.

2. Use createdb or CREATE DATABASE to create a new database using
   the database in (1) as the template.

3. Run tests in the new database.

4. Repeat (2) and (3) as necessary.

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to