pgsql: Fix data-corruption hazard in WAL-logged CREATE DATABASE.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix data-corruption hazard in WAL-logged CREATE DATABASE.
Дата
Msg-id E1oKM4g-000axT-Dt@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix data-corruption hazard in WAL-logged CREATE DATABASE.

RelationCopyStorageUsingBuffer thought it could skip copying
empty pages, but of course that does not work at all, because
subsequent blocks will be out of place.

Also fix it to acquire share lock on the source buffer.  It *might*
be safe to not do that, but it's not very certain, and I don't think
this code deserves any benefit of the doubt.

Dilip Kumar, per complaint from me

Discussion: https://postgr.es/m/3679800.1659654066@sss.pgh.pa.us

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/811203d4aff505c414e4a9e8c57ea6bb3edfe92e

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Simplify gettimeofday() fallback logic.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix function-defined-but-not-used warning.