From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: pg_upgrade: Don't overwrite existing files.
Date: Mon, 06 Jun 2016 14:00:39 +0000
Message-ID: <E1b9v55-0006zX-Ng@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
pg_upgrade: Don't overwrite existing files.
For historical reasons, copyFile and rewriteVisibilityMap took a force
argument which was always passed as true, meaning that any existing
file should be overwritten. However, it seems much safer to instead
fail if a file we need to write already exists.
While we're at it, remove the "force" argument altogether, since it was
never passed as anything other than true (and now we would never pass
it as anything other than false, if we kept it).
Noted by Andres Freund during post-commit review of the patch that added
rewriteVisibilityMap, commit 7087166a88fe0c04fc6636d0d6d6bea1737fc1fb,
but this also changes the behavior when copying files without rewriting
them.
Patch by Masahiko Sawada.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/e191a6900520a28ece9393eec2fdd69f292f12c4
Modified Files
--------------
src/bin/pg_upgrade/file.c | 16 ++++++++--------
src/bin/pg_upgrade/pg_upgrade.h | 5 ++---
src/bin/pg_upgrade/relfilenode.c | 6 +++---
3 files changed, 13 insertions(+), 14 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org
Subject: Re: pgsql: pg_upgrade: Don't overwrite existing files.
In-Reply-To: <E1b9v55-0006zX-Ng@gemulon.postgresql.org>
References: <E1b9v55-0006zX-Ng@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox