pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: PostgreSQL as a local in-memory cache
Date: Thu, 17 Jun 2010 19:25:11 -0400
Message-ID: <28137.1276817111@sss.pgh.pa.us> (raw)
In-Reply-To: <4C1AA949.7050301@agliodbs.com>
References: <cb0fb58c-9134-4314-a1d0-08fc39f911a6@40g2000pry.googlegroups.com>
	<18287446-8677-46d6-a581-c4777f60ebda@40g2000pry.googlegroups.com>
	<4C1A5B81.8050908@agliodbs.com>
	<m2typ18ow0.fsf@hi-media.com>
	<4C1AA949.7050301@agliodbs.com>

Josh Berkus <josh@agliodbs.com> writes:
>> (a) and (d) are probably simple, if by "reprovisioning" you mean
>> "rm -rf $PGDATA; initdb".

> Exactly.  Followed by "scp database_image".  Or heck, just replacing the
> whole VM.

Right, that would work.  I don't think you really need to implement that
inside Postgres.  I would envision having the startup script do it, ie

	rm -rf $PGDATA
	cp -pr prepared-database-image $PGDATA

	# this loop exits when postmaster exits normally
	while ! postmaster ...
	do
		rm -rf $PGDATA
		cp -pr prepared-database-image $PGDATA
	done

Then all you need is a tweak to make the postmaster exit(1) after
a crash instead of trying to launch recovery.

			regards, tom lane



view thread (73+ messages)  latest in thread

Message-ID: <28137.1276817111@sss.pgh.pa.us>
Permalink:  ../28137.1276817111@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28137.1276817111@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, josh@agliodbs.com
  Subject: Re: PostgreSQL as a local in-memory cache
  In-Reply-To: <28137.1276817111@sss.pgh.pa.us>

* 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