1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Fix syslog bug: if any messages are emitted to write_syslog before

the facility has been set, the facility gets set to LOCAL0 and cannot
be changed later.  This seems reasonably plausible to happen, particularly
at higher debug log levels, though I am not certain it explains Han Holl's
recent report.  Easiest fix is to teach the code how to change the value
on-the-fly, which is nicer anyway.  I made the settings PGC_SIGHUP to
conform with log_destination.
This commit is contained in:
Tom Lane
2005-10-14 20:53:56 +00:00
parent f620098dc8
commit abd3f43b4c
4 changed files with 110 additions and 73 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.79 2005/06/10 16:23:10 neilc Exp $
* $PostgreSQL: pgsql/src/include/utils/elog.h,v 1.80 2005/10/14 20:53:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -283,6 +283,9 @@ extern int Log_destination;
/* Other exported functions */
extern void DebugFileOpen(void);
extern char *unpack_sql_state(int sql_state);
#ifdef HAVE_SYSLOG
extern void set_syslog_parameters(const char *ident, int facility);
#endif
/*
* Write errors to stderr (or by equal means when stderr is