[PATCH] `pg_dump -Fd` doesn't check write return status...

Поиск
Список
Период
Сортировка
От Sean Chittenden
Тема [PATCH] `pg_dump -Fd` doesn't check write return status...
Дата
Msg-id assp.0137c22fa4.227AE3AA-478D-42AD-BB51-FD90F25157A6@chittenden.org
обсуждение исходный текст
Ответы Re: [PATCH] `pg_dump -Fd` doesn't check write return status...  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
The attached patch fixes the case when `pg_dump -Fd …` is called on a partition where write(2) fails for some reason or
another.In this case, backup jobs were returning with a successful exit code even though most of the files in the dump
directorywere all zero length. 

I haven’t tested this patch’s failure conditions but the fix seems simple enough: cfwrite() needs to have its return
statuschecked everywhere and exit_horribly() upon any failure. In this case, callers of _WriteData() were not checking
thereturn status and were discarding the negative return status (e.g. ENOSPC). 

I made a cursory pass over the code and found one other instance where write status wasn’t being checked and also
includedthat. 

-sc




--
Sean Chittenden
sean@chittenden.org


Вложения

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: commit fest status and release timeline
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: ALTER TABLE lock strength reduction patch is unsafe