diff options
author | Fujii Masao <fujii@postgresql.org> | 2020-01-24 20:42:52 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2020-01-24 20:42:52 +0900 |
commit | d694e0bb793ebd6b392e6ef6a3b0a59ae66cbc95 (patch) | |
tree | e53f68bd8ce500aada11ebd776735d139b572618 /doc/src | |
parent | cc25464763f0211e59a209eb50a7b7a79449051f (diff) |
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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/adminpack.sgml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/src/sgml/adminpack.sgml b/doc/src/sgml/adminpack.sgml index 2655417366c..977073f7c8d 100644 --- a/doc/src/sgml/adminpack.sgml +++ b/doc/src/sgml/adminpack.sgml @@ -44,6 +44,13 @@ </entry> </row> <row> + <entry><function>pg_catalog.pg_file_sync(filename text)</function></entry> + <entry><type>void</type></entry> + <entry> + Flush a file or directory to disk + </entry> + </row> + <row> <entry><function>pg_catalog.pg_file_rename(oldname text, newname text <optional>, archivename text</optional>)</function></entry> <entry><type>boolean</type></entry> <entry> @@ -80,6 +87,18 @@ </para> <indexterm> + <primary>pg_file_sync</primary> + </indexterm> + <para> + <function>pg_file_sync</function> fsyncs the specified file or directory + named by <parameter>filename</parameter>. An error is thrown + on failure (e.g., the specified file is not present). Note that + <xref linkend="guc-data-sync-retry"/> has no effect on this function, + and therefore a PANIC-level error will not be raised even on failure to + flush database files. + </para> + + <indexterm> <primary>pg_file_rename</primary> </indexterm> <para> |