Re: un-vacuum? - Mailing list pgsql-hackers

From Michael Fuhr
Subject Re: un-vacuum?
Date
Msg-id 20060119232020.GA16549@winnie.fuhr.org
Whole thread Raw
In response to Re: un-vacuum?  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug: random() can return 1.0
Next
From: Tom Lane
Date:
Subject: Re: Large Scale Aggregation (HashAgg Enhancement)