pgsql: Fix data loss on crash after sorted GiST index build.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix data loss on crash after sorted GiST index build.
Дата
Msg-id E1nNFAq-000Aa0-LI@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix data loss on crash after sorted GiST index build.

If a checkpoint happens during sorted GiST index build, and the system
crashes after the checkpoint and after the index build has finished,
the data written to the index before the checkpoint started could be
lost. The checkpoint won't fsync it, and it won't be replayed at crash
recovery either. Fix by calling smgrimmedsync() after the index build,
just like in B-tree index build.

Backpatch to v14 where the sorted GiST index build was introduced.

Reported-by: Melanie Plageman
Discussion: https://www.postgresql.org/message-id/CAAKRu_ZJJynimxKj5xYBSziL62-iEtPE+fx-B=JzR=jUtP92mw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6c46e8a5dfc9f49e673d76fc6ae097b81d7740ef

Modified Files
--------------
src/backend/access/gist/gistbuild.c | 12 ++++++++++++
1 file changed, 12 insertions(+)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Simplify more checks related to set-returning functions
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: Guard against reallocation failure in pg_regress