aboutsummaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm/llvmjit.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-07-04 17:57:03 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-07-04 18:04:27 +0300
commitd431644b43fcce9b7c2f677db18452b0ee216b42 (patch)
treebfe9ce14e64d868160fe43217499b18a81016ce8 /src/backend/jit/llvm/llvmjit.c
parentaf8f9ec66bd19a920d02b4c0eb65b3dd6057d324 (diff)
downloadpostgresql-d431644b43fcce9b7c2f677db18452b0ee216b42.tar.gz
postgresql-d431644b43fcce9b7c2f677db18452b0ee216b42.zip
Ensure that creation of an empty relfile is fsync'd at checkpoint.
If you create a table and don't insert any data into it, the relation file is never fsync'd. You don't lose data, because an empty table doesn't have any data to begin with, but if you crash and lose the file, subsequent operations on the table will fail with "could not open file" error. To fix, register an fsync request in mdcreate(), like we do for mdwrite(). Per discussion, we probably should also fsync the containing directory after creating a new file. But that's a separate and much wider issue. Backpatch to all supported versions. Reviewed-by: Andres Freund, Thomas Munro Discussion: https://www.postgresql.org/message-id/d47d8122-415e-425c-d0a2-e0160829702d%40iki.fi
Diffstat (limited to 'src/backend/jit/llvm/llvmjit.c')
0 files changed, 0 insertions, 0 deletions