Re: odd problem ! - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: odd problem !
Date
Msg-id 1111583243.11750.651.camel@localhost.localdomain
Whole thread Raw
In response to Re: odd problem !  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: odd problem !
List pgsql-hackers
On Tue, 2005-03-22 at 19:07 -0500, Tom Lane wrote:
> Oleg Bartunov <oleg@sai.msu.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



pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas DAZ SD"
Date:
Subject: Re: locks in CREATE TRIGGER, ADD FK
Next
From: Simon Riggs
Date:
Subject: Re: odd problem !