Re: odd problem !

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: odd problem !
Date: 2005-03-23 13:07:23
Message-ID: 1111583243.11750.651.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2005-03-22 at 19:07 -0500, Tom Lane wrote:
> Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> writes:
> >> This isn't a problem in normal use of course, but it'd be a serious
> >> issue for someone engaging in WAL-shipping, if their backup postmaster
> >> were living at a different absolute path. We probably need to think
>
> > right, this is normal situation if you backup to the same server.
> > Not sure how it's usefull, but still
>
> >> about whether we can make CREATE DATABASE log only relative paths.
>
> > any problem ?
>
> I've committed a fix --- please check that it solves your problem.
> (I have to leave for a few hours so I can't check it myself right away.)
>
> >> Log-shipping CREATE TABLESPACE commands is even more interesting :-(.
> >> Not sure how to deal with that.
>
> > in general case it's impossible.
>
> Yeah :-( ... needs more thought.

Just realised that this isn't just a problem with log-shipping.

If you restore a database onto a server that already has a data
directory on it in the same place as the one referenced by the restored
copy, then you'll overwrite the existing one.

That means for RPM distros where the path is initially fixed, you could
wipe out a database when trying to perform a recovery from another
system...

Oh dear. Yes, needs more thought and a bug fix for inclusion in 8.0.2+
is probably warranted.

Best Regards, Simon Riggs

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-03-23 13:28:26 Re: odd problem !
Previous Message Zeugswetter Andreas DAZ SD 2005-03-23 11:28:21 Re: locks in CREATE TRIGGER, ADD FK