pgsql: On Windows, syslogger runs in two threads. - Mailing list pgsql-committers

From heikki@postgresql.org (Heikki Linnakangas)
Subject pgsql: On Windows, syslogger runs in two threads.
Date
Msg-id 20100416095155.027647541D0@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
On Windows, syslogger runs in two threads. The main thread processes config
reload and rotation signals, and a helper thread reads messages from the
pipe and writes them to the log file. However, server code isn't generally
thread-safe, so if both try to do e.g palloc()/pfree() at the same time,
bad things will happen. To fix that, use a critical section (which is like
a mutex) to enforce that only one the threads are active at a time.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/postmaster:
        syslogger.c (r1.51.2.2 -> r1.51.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/syslogger.c?r1=1.51.2.2&r2=1.51.2.3)

pgsql-committers by date:

Previous
From: heikki@postgresql.org (Heikki Linnakangas)
Date:
Subject: pgsql: On Windows, syslogger runs in two threads.
Next
From: heikki@postgresql.org (Heikki Linnakangas)
Date:
Subject: pgsql: On Windows, syslogger runs in two threads.