pgsql: Fix race condition in win32 signal handling. - Mailing list pgsql-committers

From [email protected] (Magnus Hagander)
Subject pgsql: Fix race condition in win32 signal handling.
Date
Msg-id [email protected]
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix race condition in win32 signal handling.

There was a race condition where the receiving pipe could be closed by the
child thread if the main thread was pre-empted before it got a chance to
create a new one, and the dispatch thread ran to completion during that time.

One symptom of this is that rows in pg_listener could be dropped under
heavy load.

Analysis and original patch by Radu Ilie, with some small
modifications by Magnus Hagander.

Modified Files:
--------------
    pgsql/src/backend/port/win32:
        signal.c (r1.23 -> r1.24)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/port/win32/signal.c?r1=1.23&r2=1.24)

pgsql-committers by date:

Previous
From: [email protected] (User Fxjr)
Date:
Subject: npgsql - Npgsql2: Fixed backslash for windows .bat :)
Next
From: [email protected] (Magnus Hagander)
Date:
Subject: pgsql: Fix race condition in win32 signal handling.