pgsql: Use CREATE DATABASE ... STRATEGY = FILE_COPY in pg_upgrade.

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема pgsql: Use CREATE DATABASE ... STRATEGY = FILE_COPY in pg_upgrade.
Дата
Msg-id E1sQvm1-000twG-P3@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Use CREATE DATABASE ... STRATEGY = FILE_COPY in pg_upgrade.

While this strategy is ordinarily quite costly because it requires
performing two checkpoints, testing shows that it tends to be a
faster choice than WAL_LOG during pg_upgrade, presumably because
fsync is turned off.  Furthermore, we can skip the checkpoints
altogether because the problems they are intended to prevent don't
apply to pg_upgrade.  Instead, we just need to CHECKPOINT once in
the new cluster after making any changes to template0 and before
restoring the rest of the databases.  This ensures that said
template0 changes are written out to disk prior to creating the
databases via FILE_COPY.

Co-authored-by: Matthias van de Meent
Reviewed-by: Ranier Vilela, Dilip Kumar, Robert Haas, Michael Paquier
Discussion: https://postgr.es/m/Zl9ta3FtgdjizkJ5%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/64f34eb2e2ce4bca7351d8c88a6999aeed000c4a

Modified Files
--------------
src/backend/commands/dbcommands.c | 18 +++++++++++++++---
src/bin/pg_dump/pg_dump.c         |  8 +++++++-
src/bin/pg_upgrade/pg_upgrade.c   | 12 ++++++++++++
3 files changed, 34 insertions(+), 4 deletions(-)


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Choose ports for test servers less likely to result in conflicts
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Symlink pg_replslot robustly on Windows in pg_basebackup test