aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2022-02-24 14:34:06 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2022-02-24 14:34:09 +0200
commit7d80e93fb1f1059ba3691b2584bb16992d7d734e (patch)
tree4d5adef3de07c4a16f6c7f14308214869b71e469 /src/backend/utils/adt/numeric.c
parentdd7c0597918a6922a43a1f2e7085e6276a6216ec (diff)
downloadpostgresql-7d80e93fb1f1059ba3691b2584bb16992d7d734e.tar.gz
postgresql-7d80e93fb1f1059ba3691b2584bb16992d7d734e.zip
Fix data loss on crash after sorted GiST index build.
If a checkpoint happens during the index build, and the system crashes after the checkpoint and the index build have finished, the data written to the index before the checkpoint started could be lost. The checkpoint won't have fsync'd 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
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions