Re: Add pg_file_sync() to adminpack

Artur Zakirov <zaartur@gmail.com>

From: Arthur Zakirov <zaartur@gmail.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>, Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>
Cc: 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-24T04:28:29Z
Lists: pgsql-hackers
On 2020/01/17 16:05, Fujii Masao wrote:
> On 2020/01/17 13:36, Michael Paquier wrote:
>> Yeah, that should be either ERROR and return a void result, or issue a
>> WARNING/ERROR (depending on the code path, maybe PANIC?) with a
>> boolean status returned if there is a WARNING.  Mixing both concepts
>> with an ERROR all the time and always a true status is just weird,
>> because you know that if no errors are raised then the status will be
>> always true.  So there is no point to have a boolean status to begin
>> with.
> 
> OK, so our consensus is to return void on success and throw an error
> otherwise. Attached is the updated version of the patch.
Thank you for the new version!

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".

-- 
Arthur



Commits

  1. Add pg_file_sync() to adminpack extension.