Re: [GENERAL] Restart after power outage: createdb

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: lapham(at)jandr(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Restart after power outage: createdb
Date: 2006-09-27 21:36:43
Message-ID: 20060927213643.GZ19827@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Sep 27, 2006 at 04:52:51PM -0400, Tom Lane wrote:
> "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.

I think it would be really useful to tell the DBA that there's a bunch
of files in $PGDATA that are probably dead. If stuff had suddenly
disappeared out of the catalog I'd certainly like to know it.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karen Hill 2006-09-27 21:49:28 Re: cyclical redundancy checksum algorithm(s)?
Previous Message Jeff Davis 2006-09-27 21:26:03 'pg_ctl -w' times out when unix_socket_directory is set

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2006-09-27 22:12:41 Re: 'pg_ctl -w' times out when unix_socket_directory is
Previous Message Jeff Davis 2006-09-27 21:26:03 'pg_ctl -w' times out when unix_socket_directory is set