Add pg_file_sync() to adminpack extension.
authorFujii Masao <fujii@postgresql.org>
Fri, 24 Jan 2020 11:42:52 +0000 (20:42 +0900)
committerFujii Masao <fujii@postgresql.org>
Fri, 24 Jan 2020 11:42:52 +0000 (20:42 +0900)
commitd694e0bb793ebd6b392e6ef6a3b0a59ae66cbc95
treee53f68bd8ce500aada11ebd776735d139b572618
parentcc25464763f0211e59a209eb50a7b7a79449051f
Add pg_file_sync() to adminpack extension.

This function allows us to fsync the specified file or directory.
It's useful, for example, when we want to sync the file that
pg_file_write() writes out or that COPY TO exports the data into,
for durability.

Author: Fujii Masao
Reviewed-By: Julien Rouhaud, Arthur Zakirov, Michael Paquier, Atsushi Torikoshi
Discussion: https://www.postgresql.org/message-id/CAHGQGwGY8uzZ_k8dHRoW1zDcy1Z7=5GQ+So4ZkVy2u=nLsk=hA@mail.gmail.com
contrib/adminpack/Makefile
contrib/adminpack/adminpack--2.0--2.1.sql [new file with mode: 0644]
contrib/adminpack/adminpack.c
contrib/adminpack/adminpack.control
contrib/adminpack/expected/adminpack.out
contrib/adminpack/sql/adminpack.sql
doc/src/sgml/adminpack.sgml
src/backend/storage/file/fd.c
src/include/storage/fd.h