Re: Add pg_file_sync() to adminpack

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Arthur Zakirov <zaartur@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>, Robert Haas <robertmhaas@gmail.com>, Atsushi Torikoshi <atorik@gmail.com>, Fujii Masao <masao.fujii@gmail.com>, Julien Rouhaud <rjuju123@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-01-24T05:56:45Z
Lists: pgsql-hackers
On Fri, Jan 24, 2020 at 01:28:29PM +0900, Arthur Zakirov wrote:
> It is compiled and passes the tests. There is the documentation and it is
> built too without an error.
> 
> It seems that consensus about the returned type was reached and I marked the
> patch as "Ready for Commiter".

+       fsync_fname_ext(filename, S_ISDIR(fst.st_mode), false, ERROR);
One comment here: should we warn better users in the docs that a fsync
failule will not trigger a PANIC here?  Here, fsync failure on heap
file => ERROR => potential data corruption.
--
Michael

Commits

  1. Add pg_file_sync() to adminpack extension.