Re: incorrect handling of the timeout in pg_receivexlog
От | Fujii Masao |
---|---|
Тема | Re: incorrect handling of the timeout in pg_receivexlog |
Дата | |
Msg-id | CAHGQGwFmWE8qjJ7L_WwdZtxKjXYXyZgGXo6+4ZV6BNb8A6NUrA@mail.gmail.com обсуждение исходный текст |
Ответ на | incorrect handling of the timeout in pg_receivexlog (Fujii Masao <masao.fujii@gmail.com>) |
Ответы |
Re: incorrect handling of the timeout in pg_receivexlog
|
Список | pgsql-hackers |
On Tue, Feb 7, 2012 at 2:58 PM, Fujii Masao <masao.fujii@gmail.com> wrote: > Hi, > > When I compiled HEAD with --disable-integer-datetimes and tested > pg_receivexlog, I encountered unexpected replication timeout. As > far as I read the pg_receivexlog code, the cause of this problem is > that pg_receivexlog handles the standby message timeout incorrectly > in --disable-integer-datetimes. The attached patch fixes this problem. > Comments? receivelog.c -------timeout.tv_sec = last_status + standby_message_timeout - now - 1;if (timeout.tv_sec <= 0) ------- Umm.. the above code also handles the timestamp incorrectly. ISTM that the root cause of these problems is that receivelog.c uses TimestampTz. What about changing receivelog.c so that it uses time_t instead of TimestampTz? Which would make the code simpler, I think. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
В списке pgsql-hackers по дате отправления: