1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-06 18:42:54 +03:00
#log_line_prefix = ''         # e.g. '<%u%%%d> '
                              # %u=user name %d=database name
                              # %r=remote host and port
                              # %p=PID %t=timestamp %i=command tag
                              # %c=session id %l=session line number
                              # %s=session start timestamp
                              # %x=stop here in non-session processes
                              # %%='%'

Andrew Dunstan
This commit is contained in:
Bruce Momjian
2004-03-09 04:43:07 +00:00
parent af96aa9ab1
commit 2d3fe86bc4
9 changed files with 274 additions and 15 deletions

View File

@@ -5,7 +5,7 @@
* to contain some useful information. Mechanism differs wildly across
* platforms.
*
* $PostgreSQL: pgsql/src/backend/utils/misc/ps_status.c,v 1.17 2004/02/22 21:26:55 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/ps_status.c,v 1.18 2004/03/09 04:43:07 momjian Exp $
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
* various details abducted from various places
@@ -26,6 +26,7 @@
#include <crt_externs.h>
#endif
#include "libpq/libpq.h"
#include "miscadmin.h"
#include "utils/ps_status.h"
@@ -276,11 +277,16 @@ init_ps_display(const char *username, const char *dbname,
void
set_ps_display(const char *activity)
{
#ifndef PS_USE_NONE
/* no ps display for stand-alone backend */
if (!IsUnderPostmaster)
return;
/* save it for logging context */
if (MyProcPort)
MyProcPort->commandTag = (char *) activity;
#ifndef PS_USE_NONE
#ifdef PS_USE_CLOBBER_ARGV
/* If ps_buffer is a pointer, it might still be null */
if (!ps_buffer)