Re: Tracking wait event for latches

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Tracking wait event for latches
Дата
Msg-id CA+Tgmoayiuk=vB_eQQxxGMU6pXZz8g=Y96-a3T2gOCua7A1rPQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Tracking wait event for latches  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Tracking wait event for latches  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Tue, Oct 4, 2016 at 5:07 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> More seriously, the Windows animals have been complaining about
> pg_sleep() crashing the system:
>   SELECT pg_sleep(0.1);
> ! server closed the connection unexpectedly
> ! This probably means the server terminated abnormally
> ! before or while processing the request.
> ! connection to server was lost
>
> And I think that the answer to this crash is in WaitForSingleObject(),
> where the macro WAIT_TIMEOUT is already defined, so there is an
> overlap with the new declarations in pgstat.h:
> https://msdn.microsoft.com/en-us/library/aa450988.aspx
> This is also generating a bunch of build warnings now that I compile
> HEAD on Windows. Regression tests are not crashing here, but I am
> getting a failure in stats.sql and pg_sleep is broken. I swear I
> tested that at some point and did not see a crash or those warnings...
> But well what's done is done.
>
> It seems to me that a correct answer would be to rename this class ID.
> But instead I'd suggest to append the prefix PG_* to all the class
> events like in the attached, that passes make-check, contrib-check,
> modules-check and builds without warnings on Windows. A more simple
> fix would be just to rename WAIT_TIMEOUT to something else but
> appending PG_ looks better in the long term.

Committed.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Tracking wait event for latches
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Relids in upper relations