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 ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match