Re: New pg_upgrade data directory inside old one? - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: New pg_upgrade data directory inside old one?
Date
Msg-id CABUevEyjxfjK8D2NEfTbv_kpzHNuEExDb_qb30oqUNMK1LReew@mail.gmail.com
Whole thread Raw
In response to New pg_upgrade data directory inside old one?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: New pg_upgrade data directory inside old one?
List pgsql-hackers


On Mon, Feb 15, 2016 at 6:29 PM, Bruce Momjian <bruce@momjian.us> wrote:
Someone on IRC reported that if they had run the pg_upgrade-created
delete_old_cluster.sh shell script it would have deleted their old _and_
new data directories.  (Fortunately they didn't run it.)

I was confused how this could have happened, and the user explained that
their old cluster was in /u/pgsql/data, and that they wanted to switch to
a per-major-version directory naming schema, so they put the new data
directory in /u/pgsql/data/9.5.  (They could have just moved the
directory while the server was down, but didn't.)

Unfortunately, there is no check for having the new cluster data
directory inside the old data directory, only a check for tablespace
directories in the old cluster.  (I never anticipated someone would do
this.)

Interesting - I definitely wouldn't have expected that either. And it definitely seems like a foot-gun we should protect the users against. 


--

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: New pg_upgrade data directory inside old one?
Next
From: Filip Rembiałkowski
Date:
Subject: Re: proposal: make NOTIFY list de-duplication optional