Re: PostgreSQL as a local in-memory cache

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: PostgreSQL as a local in-memory cache
Дата
Msg-id
28137.1276817111@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
PostgreSQL as a local in-memory cache "jgardner@jonathangardner.net" <jgardner@jonathangardner.net>
Re: PostgreSQL as a local in-memory cache Dave Crooke <dcrooke@gmail.com>
Re: PostgreSQL as a local in-memory cache Craig James <craig_james@emolecules.com>
Josh Berkus  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
В списке pgsql-performance по дате отправления
От: Tom Lane
Дата:
От: Tom Wilcox
Дата:
FAQ