Re: Small race in pg_xlogdump --follow

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Small race in pg_xlogdump --follow
Дата
Msg-id CABUevEyQqURaa6gRMRSvrM9vEGAFNc-0OuF4Y0F_r3_+md9_Bw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Small race in pg_xlogdump --follow  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Small race in pg_xlogdump --follow  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Sep 26, 2016 at 3:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Magnus Hagander <magnus@hagander.net> writes:
> 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?

The patch assumes that pg_usleep won't change errno, an assumption
I have little faith in.


Oh, right, at the very last loop. I've never seen it need more than 1 loop so I didn't manage to hit that codepath :) But yeah, saving errno and restoring it on the other side of pg_usleep is probably a good idea.

--
Вложения

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

Предыдущее
От: Jeevan Ladhe
Дата:
Сообщение: Re: pgbench more operators & functions
Следующее
От: Vladimir Gordiychuk
Дата:
Сообщение: Re: Stopping logical replication protocol