Re: Testing Technique when using a DB

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Testing Technique when using a DB
Date: 2013-03-16 09:31:08
Message-ID: ki1e4s$d9d$1@gonzo.reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2013-03-13, Joe Van Dyk <joe(at)tanga(dot)com> wrote:
> --047d7b6226a405604904d7d09001
> Content-Type: text/plain; charset=UTF-8
>
> On Wed, Mar 13, 2013 at 8:47 AM, Steve Crawford <
> scrawford(at)pinpointresearch(dot)com> wrote:
>
>> On 03/12/2013 09:05 PM, Perry Smith wrote:
>>
>>> To all who replied:
>>>
>>> Thank you. ...
>>>
>>>
>>> I had not seriously considered pg_dump / pg_restore because I assumed it
>>> would be fairly slow but I will experiment with pg_restore and template
>>> techniques this weekend and see which ones prove viable.
>>>
>>
>> Another possibility a bit outside my area of expertise but what about a VM
>> image configured to your needs that you just spin up as needed then discard
>> when done (i.e. always spinning up the same starting image)?
>>
>>
> I'd guess the OP is running hundreds of tests, where the data needs to be
> reverted/reset after each test, and each individual test might run in, say,
> 0.1 seconds. This is a really common technique when testing web apps. I
> don't think you'd want to start a VM for each of these tests, especially
> when the tests are small and specific.

A vm rewinds to a snapshot in a few seconds this will likely be faster than
any other way* if the database is large.

*except possibly a similar trick using ZFS snapshots may be faster.

--
⚂⚃ 100% natural

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2013-03-16 10:32:25 Re: Addled index
Previous Message Oleg Alexeev 2013-03-16 08:33:12 Re: Addled index