pgsql: pg_upgrade: Don't overwrite existing files.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: pg_upgrade: Don't overwrite existing files.
Дата
Msg-id E1b9v55-0006zX-Ng@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Fix typo.
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: shm_mq: After a send fails with SHM_MQ_DETACHED, later ones shou