Re: Deficient error handling in pg_dump and pg_basebackup

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Deficient error handling in pg_dump and pg_basebackup
Дата
Msg-id YZRsg6JCh8DhoCHz@paquier.xyz
обсуждение исходный текст
Ответ на Re: Deficient error handling in pg_dump and pg_basebackup  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Deficient error handling in pg_dump and pg_basebackup  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Nov 10, 2021 at 02:03:11PM +0900, Michael Paquier wrote:
>> but this code seems about as fishy and ill-thought-out as anything
>> else I've touched here.  Why is this different from the half-dozen
>> other fsync-error cases in the same file?  Why, if fsync failure
>> here is so catastrophic, is it okay to just return a normal failure
>> code when tar_close doesn't even get to this point because of some
>> earlier error?
>
> Hmm, I don't think that's fine.  There is an extra one in tar_finish()
> that would report a failure, but not exit() immediately.  All the
> callers of the sync callback in receivelog.c exit() on sight, but I am
> wondering if it would not be saner to just exit() from walmethods.c
> each time we see a failure with a fsync().

Taking the issues with fsync() aside, which could be improved as a
separate patch, is there anything I can do for this thread?  The error
handling problems in walmethods.c introduced by the integration of LZ4
are on me, so I'd like to fix it.  0002 depends on some parts of 0001,
as well for walmethods.c and the new error code paths.  And I have
been through this code quite a lot recently.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: pg_get_publication_tables() output duplicate relid