| From: | Steve Atkins <steve(at)blighty(dot)com> |
|---|---|
| To: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
| Cc: | "Wes Vaske (wvaske)" <wvaske(at)micron(dot)com> |
| Subject: | Re: Fastest Backup & Restore for perf testing |
| Date: | 2015-05-27 20:39:06 |
| Message-ID: | 60ED9885-1F66-4BD0-9DE7-8CCCB7D0D75E@blighty.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
> On May 27, 2015, at 1:24 PM, Wes Vaske (wvaske) <wvaske(at)micron(dot)com> wrote:
>
> Hi,
>
> I’m running performance tests against a PostgreSQL database (9.4) with various hardware configurations and a couple different benchmarks (TPC-C & TPC-H).
>
> I’m currently using pg_dump and pg_restore to refresh my dataset between runs but this process seems slower than it could be.
>
> Is it possible to do a tar/untar of the entire /var/lib/pgsql tree as a backup & restore method?
>
> If not, is there another way to restore a dataset more quickly? The database is dedicated to the test dataset so trashing & rebuilding the entire application/OS/anything is no issue for me—there’s no data for me to lose.
>
Dropping the database and recreating it from a template database with "create database foo template foo_template" is about as fast as a file copy, much faster than pg_restore tends to be.
Cheers,
Steve
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2015-05-27 22:02:28 | Re: ERROR: missing chunk number 0 for toast value 1821556134 in pg_toast_17881 |
| Previous Message | Andrew Dunstan | 2015-05-27 20:37:01 | Re: Fastest Backup & Restore for perf testing |