Re: [HACKERS] CREATE DATABASE on the heap with PostgreSQL?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Maarten Boekhold <boekhold(at)emirates(dot)net(dot)ae>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] CREATE DATABASE on the heap with PostgreSQL?
Date: 2004-06-07 15:50:40
Message-ID: 4604.1086623440@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Maarten Boekhold <boekhold(at)emirates(dot)net(dot)ae> writes:
> The original poster seemed not to care too much about whether the data
> in this database is persistent. Under that assumption, I wonder if it's
> possible to do the following:

> 1- start postmaster
> 2 - create database on RAM disk (will be easy once tablespaces are there)
> 3 - work with this database
> 4 - postmaster shuts down / reboot server
> 5 - start postmaster
> 6 - create database ...

> The question is whether 5/6 will work, as the database will have entries
> in the system catalogs, and since the data of the database has
> disappeared. I.e. postmaster will probably complain mightly on startup.

You'd probably have to do a manual "DELETE FROM pg_database" to get rid
of the row, but as of right now I don't think there'd be any other
cleanup needed. The tablespace patch might complicate the picture though.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jack Kerkhof 2004-06-07 15:52:55 Identifying the 'current user' when using a connection pool
Previous Message Tom Lane 2004-06-07 15:48:37 Re: contents of pg_database vanished..

Browse pgsql-hackers by date

  From Date Subject
Next Message Bort, Paul 2004-06-07 15:54:36 Re: serverlog function
Previous Message Andrew Dunstan 2004-06-07 15:50:06 Re: Case preserving - suggestions