Skip site navigation (1) Skip section navigation (2)

pgsql: Fix syslogger's rotation disable/re-enable logic.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix syslogger's rotation disable/re-enable logic.
Date: 2012-04-27 04:14:07
Message-ID: E1SNcZL-0007Ks-0i@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix syslogger's rotation disable/re-enable logic.

If it fails to open a new log file, the syslogger assumes there's something
wrong with its parameters (such as log_directory), and stops attempting
automatic time-based or size-based log file rotations.  Sending it SIGHUP
is supposed to start that up again.  However, the original coding for that
was really bogus, involving clobbering a couple of GUC variables and hoping
that SIGHUP processing would restore them.  Get rid of that technique in
favor of maintaining a separate flag showing we've turned rotation off.
Per report from Mark Kirkwood.

Also, the syslogger will automatically attempt to create the log_directory
directory if it doesn't exist, but that was only happening at startup.
For consistency and ease of use, it should do the same whenever the value
of log_directory is changed by SIGHUP.

Back-patch to all supported branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/537b26695389ae67adc4fbbe04254bc527a11128

Modified Files
--------------
src/backend/postmaster/syslogger.c |   26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2012-04-27 21:15:52
Subject: pgsql: Add options to git_changelog for use in major release notecreat
Previous:From: Robert HaasDate: 2012-04-27 00:03:16
Subject: pgsql: Prevent index-only scans from returning wrong answers underHot

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group