Re: tablespaces inside $PGDATA considered harmful - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: tablespaces inside $PGDATA considered harmful
Date
Msg-id 20150130161928.GB20744@momjian.us
Whole thread Raw
In response to tablespaces inside $PGDATA considered harmful  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: tablespaces inside $PGDATA considered harmful
List pgsql-hackers
On Fri, Jan 30, 2015 at 11:12:43AM -0500, Robert Haas wrote:
> I think everyone who has read this mailing list for a while is
> probably already aware of this problem.  When you create a tablespace
> somewhere inside the data directory, weird things happen. If you
> pg_upgrade and then incautiously run the delete_old_cluster.sh script
> thus created, you will blow away large chunks of your data.[1]  If you

pg_upgrade doesn't create the deletion script in this case, and warns
the user:
       Could not create a script to delete the old cluster's data       files because user-defined tablespaces exist in
theold cluster       directory.  The old cluster's contents must be deleted manually.
 

> In the short term, I favor just adding a warning, so that people get
> some clue that they are doing something that might be a bad idea.  In
> the long term, we might want to do more.  Thoughts?

Yes, good idea.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: tablespaces inside $PGDATA considered harmful
Next
From: Sawada Masahiko
Date:
Subject: Re: Proposal: knowing detail of config files via SQL