Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] Restart after power outage: createdb

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: lapham(at)jandr(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Restart after power outage: createdb
Date: 2006-09-27 20:52:51
Message-ID: 6579.1159390371@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
"Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> Then again, if we're doing that, we could probably just nuke 'em...

This has been considered and rejected before, on the grounds that
removing files you don't know the source of is a good way to lose data.

Come to think of it, that argument bears on the immediate problem too.
The way createdb() is coded, if it gets a failure (like "File exists")
trying to create the database's directories, it will attempt to apply
remove_dbtablespaces() to clean up after itself.  This would result in
removing the pre-existing directory, which violates the principle of
not removing unexpected files.  So now I'm starting to think we do need
a check-for-conflicting-files step in createdb.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Jeff DavisDate: 2006-09-27 21:26:03
Subject: 'pg_ctl -w' times out when unix_socket_directory is set
Previous:From: Jim C. NasbyDate: 2006-09-27 20:44:36
Subject: Re: [GENERAL] Restart after power outage: createdb

pgsql-general by date

Next:From: Tom LaneDate: 2006-09-27 20:56:04
Subject: Re: Cumulative aggregate
Previous:From: Jim C. NasbyDate: 2006-09-27 20:44:36
Subject: Re: [GENERAL] Restart after power outage: createdb

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group