1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Remove GUC log_statement, log_pid, log_timestamp, log_source_port.

Functionality superceeded by log_line_prefix.

Andrew Dunstan
This commit is contained in:
Bruce Momjian
2004-03-15 15:56:28 +00:00
parent 6812e95a28
commit d6b57925ca
8 changed files with 22 additions and 140 deletions

View File

@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.373 2004/03/10 21:12:46 momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.374 2004/03/15 15:56:21 momjian Exp $
*
* NOTES
*
@@ -212,8 +212,7 @@ int CheckPointTimeout = 300;
int CheckPointWarning = 30;
time_t LastSignalledCheckpoint = 0;
bool log_hostname; /* for ps display */
bool LogSourcePort;
bool log_hostname; /* for ps display and logging */
bool Log_connections = false;
bool Db_user_namespace = false;
@@ -2414,6 +2413,7 @@ BackendInit(Port *port)
struct timezone tz;
char remote_host[NI_MAXHOST];
char remote_port[NI_MAXSERV];
char remote_ps_data[NI_MAXHOST];
IsUnderPostmaster = true; /* we are a postmaster subprocess now */
@@ -2474,21 +2474,15 @@ BackendInit(Port *port)
remote_port, sizeof(remote_port),
NI_NUMERICHOST | NI_NUMERICSERV);
}
snprintf(remote_ps_data, sizeof(remote_ps_data),
remote_port[0] == '\0' ? "%s" : "%s(%s)",
remote_host, remote_port);
if (Log_connections)
ereport(LOG,
(errmsg("connection received: host=%s port=%s",
remote_host, remote_port)));
if (LogSourcePort)
{
/* modify remote_host for use in ps status */
char tmphost[NI_MAXHOST];
snprintf(tmphost, sizeof(tmphost), "%s(%s)", remote_host, remote_port);
StrNCpy(remote_host, tmphost, sizeof(remote_host));
}
/*
* save remote_host and remote_port in port stucture
*/
@@ -2517,7 +2511,7 @@ BackendInit(Port *port)
* title for ps. It's good to do this as early as possible in
* startup.
*/
init_ps_display(port->user_name, port->database_name, remote_host);
init_ps_display(port->user_name, port->database_name, remote_ps_data);
set_ps_display("authentication");
/*