diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-03-09 04:43:07 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-03-09 04:43:07 +0000 |
commit | 2d3fe86bc4b5675ee8b9a961d3662da7c5dae341 (patch) | |
tree | cca18227333ac4c60bc06e3b58f81c7d78d6a7bc /src/backend/utils/misc/ps_status.c | |
parent | af96aa9ab186f71c99ff74ddc43c28b4a2705d66 (diff) | |
download | postgresql-2d3fe86bc4b5675ee8b9a961d3662da7c5dae341.tar.gz postgresql-2d3fe86bc4b5675ee8b9a961d3662da7c5dae341.zip |
Add:
#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
Diffstat (limited to 'src/backend/utils/misc/ps_status.c')
-rw-r--r-- | src/backend/utils/misc/ps_status.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index fcd236d0012..770882cc8ef 100644 --- a/src/backend/utils/misc/ps_status.c +++ b/src/backend/utils/misc/ps_status.c @@ -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) |