pg_upgrade old cluster delete script

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: pg_upgrade old cluster delete script
Date: 2013-02-14 05:29:52
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

You might remember this pg_upgrade bug report where the user complained
that user-defined tablespaces _inside_ the old cluster directory were
deleted by the old cluster delete script:

http://www.postgresql.org/message-id/[email protected]

and my reply that we don't want to fix this:

http://www.postgresql.org/message-id/[email protected]

However, creating a script that deletes data is never a good idea so I
have created the attached patch to avoid creating the script in these
cases, and issue a message to the user.

The test isn't perfect but it is probably close enough. I don't think
it is worth unlinking a possibly matching filename in such cases.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
pg_upgrade.diff text/x-diff 1.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-02-14 05:46:39 Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Previous Message Vlad Arkhipov 2013-02-14 04:06:11 Re: Temporal features in PostgreSQL