forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8bbf846
committed
Silence extra logging when using "postgres -C" on runtime-computed GUCs
Presently, the server may emit a variety of log messages when inspectinga runtime-computed GUC, mostly in the shape of one LOG message with thedefault configuration, related to the startup sequence launched as suchGUCs require a load of the control file and of external sharedlibraries.For example, the server will always emit a "database system is shutdown" LOG (unless the user has set log_min_messages higher than LOG),which is an annoying behavior as "postgres -C" is expected to only emitin its output the parameter value we are looking for. The parametervalue is sent to stdout, while the logs are sent to stderr so we couldrecommend to use a redirection, but there was not much love for thisworkaround either.To avoid such extra log messages, per discussion, this change setslog_min_messages to FATAL internally when -C is used on aruntime-computed GUC (even if set to PANIC in postgresql.conf). AtFATAL, the user will still receive messages explaining why a GUC valuecannot be inspected, and will know if the command is attempted on aserver already running, something not supported yet for aruntime-computed GUC.Reported-by: Magnus Hagander, Bruce MomjianAuthor: Nathan Bossart, Michael PaquierDiscussion:https://postgr.es/m/Yni6ZHkGotUU+RSf@paquier.xyz1 parent3aa7a3d commit8bbf846
File tree
2 files changed
+11
-1
lines changed- doc/src/sgml
- src/backend/postmaster
2 files changed
+11
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1448 | 1448 |
| |
1449 | 1449 |
| |
1450 | 1450 |
| |
1451 |
| - | |
| 1451 | + | |
1452 | 1452 |
| |
1453 | 1453 |
| |
1454 | 1454 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
913 | 913 |
| |
914 | 914 |
| |
915 | 915 |
| |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
916 | 926 |
| |
917 | 927 |
| |
918 | 928 |
| |
|
0 commit comments
Comments
(0)