pgsql: Force a checkpoint in CREATE DATABASE before starting to copy the

Поиск
Список
Период
Сортировка
От heikki@postgresql.org (Heikki Linnakangas)
Тема pgsql: Force a checkpoint in CREATE DATABASE before starting to copy the
Дата
Msg-id 20081009103422.D8F257545A4@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Force a checkpoint in CREATE DATABASE before starting to copy the files,
to process any pending unlinks for the source database.

Before, if you dropped a relation in the template database just before
CREATE DATABASE, and a checkpoint happened during copydir(), the checkpoint
might delete a file that we're just about to copy, causing lstat() in
copydir() to fail with ENOENT.

Backpatch to 8.3, where the pending unlinks were introduced.

Per report by Matthew Wakeling and analysis by Tom Lane.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        dbcommands.c (r1.204.2.3 -> r1.204.2.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c?r1=1.204.2.3&r2=1.204.2.4)

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

Предыдущее
От: heikki@postgresql.org (Heikki Linnakangas)
Дата:
Сообщение: pgsql: Force a checkpoint in CREATE DATABASE before starting to copy the
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix crash in bytea-to-XML mapping when the source value is