Re: Add pg_file_sync() to adminpack

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add pg_file_sync() to adminpack
Дата
Msg-id 20200117043652.GG2127@paquier.xyz
обсуждение исходный текст
Ответ на Re: Add pg_file_sync() to adminpack  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Add pg_file_sync() to adminpack
Список pgsql-hackers
On Thu, Jan 16, 2020 at 09:51:24AM -0500, Robert Haas wrote:
> On Tue, Jan 14, 2020 at 10:08 AM Atsushi Torikoshi <atorik@gmail.com> wrote:
>> fails we can get error messages. So it seems straightforward for me to
>>  'return true on success and emit an ERROR otherwise'.
>
> I agree with reporting errors using ERROR, but it seems to me that we
> ought to then make the function return 'void' rather than 'bool'.

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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: PATCH: standby crashed when replay block which truncated instandby but failed to truncate in master node