pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Steve Atkins <steve@blighty.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Cc: Wes Vaske (wvaske) <wvaske@micron.com>
Subject: Re: Fastest Backup & Restore for perf testing
Date: Thu, 28 May 2015 12:40:15 -0500
Message-ID: <556752FF.3070402@BlueTreble.com> (raw)
In-Reply-To: <60ED9885-1F66-4BD0-9DE7-8CCCB7D0D75E@blighty.com>
References: <31701C89A44B714FB8D242F806E7286C5AEC68FE@NTXBOIMBX01.micron.com>
	<60ED9885-1F66-4BD0-9DE7-8CCCB7D0D75E@blighty.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 5/27/15 3:39 PM, Steve Atkins wrote:
>
>> On May 27, 2015, at 1:24 PM, Wes Vaske (wvaske) <wvaske@micron.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.

Another possibility is filesystem snapshots, which could be even faster 
than createdb --template.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com


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



view thread (4+ messages)

Message-ID: <556752FF.3070402@BlueTreble.com>
Permalink:  ../556752FF.3070402@BlueTreble.com/
Also on:    postgresql.org/message-id/556752FF.3070402@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, steve@blighty.com, wvaske@micron.com
  Subject: Re: Fastest Backup & Restore for perf testing
  In-Reply-To: <556752FF.3070402@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox