Small race in pg_xlogdump --follow

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Small race in pg_xlogdump --follow
Дата
Msg-id CABUevEyHuA=v+xPsvkXmPSVCbJn86Gz7P-zPfWa6Z1FBieevoA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Small race in pg_xlogdump --follow  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
When using pg_xlogdump in --follow mode, there is what I believe is a small race condition when files are switched.

If pg_xlogdump detects then end of one file (by looking at the record) it will immediately try to open the following file. If that file has not yet been created, it will fail with an error message saying it cannot open the file. But there's a race condition where the server has not had time to put the file in place.

Attached patch puts a retry loop around opening the file that retries for 5 seconds (which is excessive, but should be safe) in case the file is missing (and still fails out for other error messages of course).

Comments?

--
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: VACUUM's ancillary tasks
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Small race in pg_xlogdump --follow