1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Remove am_syslogger global variable

Use the new MyBackendType instead.  More similar changes for other "am
something" variables are possible.  This one was just particularly
simple.

Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Kuntal Ghosh <kuntalghosh.2007@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/c65e5196-4f04-4ead-9353-6088c19615a3@2ndquadrant.com
This commit is contained in:
Peter Eisentraut
2020-03-11 16:36:40 +01:00
parent 8e8a0becb3
commit d90bd24391
3 changed files with 5 additions and 14 deletions

View File

@@ -74,11 +74,6 @@ char *Log_filename = NULL;
bool Log_truncate_on_rotation = false;
int Log_file_mode = S_IRUSR | S_IWUSR;
/*
* Globally visible state (used by elog.c)
*/
bool am_syslogger = false;
extern bool redirection_done;
/*
@@ -177,8 +172,6 @@ SysLoggerMain(int argc, char *argv[])
syslogger_parseArgs(argc, argv);
#endif /* EXEC_BACKEND */
am_syslogger = true;
MyBackendType = B_LOGGER;
init_ps_display(NULL);
@@ -1078,7 +1071,7 @@ flush_pipe_input(char *logbuffer, int *bytes_in_logbuffer)
/*
* Write text to the currently open logfile
*
* This is exported so that elog.c can call it when am_syslogger is true.
* This is exported so that elog.c can call it when MyBackendType is B_LOGGER.
* This allows the syslogger process to record elog messages of its own,
* even though its stderr does not point at the syslog pipe.
*/