mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Try to make silent_mode behave somewhat reasonably.
Instead of sending stdout/stderr to /dev/null after forking away from the terminal, send them to postmaster.log within the data directory. Since this opens the door to indefinite logfile bloat, recommend even more strongly that log output be redirected when using silent_mode. Move the postmaster's initial calls of load_hba() and load_ident() down to after we have started the log collector, if we are going to. This is so that errors reported by them will appear in the "usual" place. Reclassify silent_mode as a LOGGING_WHERE, not LOGGING_WHEN, parameter, since it's got absolutely nothing to do with the latter category. In passing, fix some obsolete references to -S ... this option hasn't had that switch letter for a long time. Back-patch to 8.4, since as of 8.4 load_hba() and load_ident() are more picky (and thus more likely to fail) than they used to be. This entire change was driven by a complaint about those errors disappearing into the bit bucket.
This commit is contained in:
@ -265,6 +265,11 @@
|
||||
#syslog_facility = 'LOCAL0'
|
||||
#syslog_ident = 'postgres'
|
||||
|
||||
#silent_mode = off # Run server silently.
|
||||
# DO NOT USE without syslog or
|
||||
# logging_collector
|
||||
# (change requires restart)
|
||||
|
||||
|
||||
# - When to Log -
|
||||
|
||||
@ -314,9 +319,6 @@
|
||||
# statements running at least this number
|
||||
# of milliseconds
|
||||
|
||||
#silent_mode = off # DO NOT USE without syslog or
|
||||
# logging_collector
|
||||
# (change requires restart)
|
||||
|
||||
# - What to Log -
|
||||
|
||||
|
Reference in New Issue
Block a user