On Windows, syslogger runs in two threads. The main thread processes config

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: b2bc12af46353bdc4863721f5314cf774b60cd3d
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2010-04-16T09:51:54Z
Releases: 8.4.4
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.

Files

PathChange+/−
src/backend/postmaster/syslogger.c modified +28 −33