Re: PITR Redo Create Database fails

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PITR Redo Create Database fails
Date: 2004-07-08 19:14:30
Message-ID: 20040708191430.GD10089@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 08, 2004 at 06:33:56PM +0100, Simon Riggs wrote:
> On Thu, 2004-07-08 at 16:19, Alvaro Herrera wrote:
> > On Thu, Jul 08, 2004 at 02:58:01PM +0100, Simon Riggs wrote:
> >
> > The correct solution would be to emit a XLog record for CREATE
> > DATABASE ...
>
> I'd prefer a formal approach, hence why I raised this.

What do you mean by formal? What's so informal about my approach?

> Interesting what you say about about the other stuff - a simple create
> dir worked without any problems - I wonder if a whole bunch of stuff is
> missing there?

Probably not, but just creating a directory if it isn't found doesn't
strike me as the best solution.

Consider the case where somebody gets a corrupted catalog, saying that
some table has a file on the directory 11298172987. Would you just
create the directory, create an empty file with the name you are looking
for, and then report that the blocknumber that was asked wasn't found?
Sounds like a recipe for confusion at the least, random files and
directories created everywhere on worse situations.

I don't understand why you don't want a CREATE DATABASE XLog record.
It certainly seems like the correct situation.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Jason Tesser: You might not have understood me or I am not understanding you.
Paul Thomas: It feels like we're 2 people divided by a common language...

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-07-08 19:28:12 plperl status
Previous Message Alvaro Herrera 2004-07-08 19:07:51 Re: working on support triggers on columns