Re: Stats collector frozen?

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Stats collector frozen?
Дата
Msg-id 20070126114354.GG30416@svr2.hagander.net
обсуждение исходный текст
Ответ на Re: Stats collector frozen?  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Stats collector frozen?  ("Jeremy Haile" <jhaile@fastmail.fm>)
Re: Stats collector frozen?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, Jan 26, 2007 at 12:26:58PM +0100, Magnus Hagander wrote:
> On Fri, Jan 26, 2007 at 01:11:00PM +0300, Teodor Sigaev wrote:
> > >Apparantly there is a bug lurking somewhere in pgwin32_select(). Because
> > >if I put a #undef select right before the select in pgstat.c, the
> > >regression tests pass.
> >
> > May be, problem is related to fixed bug in pgwin32_waitforsinglesocket() ?
> > WaitForMultipleObjectsEx might sleep indefinitely while waiting socket to
> > write, so, may be there is symmetrical problem with read? Or
> > pgwin32_select() is used for waiting write too?
>
>
> pgwin32_waitforsinglesocket() appears to work fine. And we only use
> FD_READ, so it's not affected by your patch from what I can tell.
>
> I've got it passnig tests with select replaced with waitforsinglesocket
> - now I just need to implement timeout in that one :-)

Attached patch seems to solve the problem on my machine at least. Uses
pgwin32_waitforsinglesocket() instead of pgwin32_select(). Changes
pgwin32_waitforsinglesocket() to accept the timeout as a parameter (this
is why it touches files outside of the stats area).

//Magnus

Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Stats collector frozen?
Следующее
От: "M.A. Oude Kotte"
Дата:
Сообщение: Rollback using WAL files?