aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/error/elog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/error/elog.c')
-rw-r--r--src/backend/utils/error/elog.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index ded96313c33..20ff94d7dda 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -42,7 +42,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.150 2004/09/05 03:42:11 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.151 2004/09/22 03:55:26 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1421,12 +1421,21 @@ log_line_prefix(StringInfo buf)
MyProcPort->remote_port);
}
break;
- case 'x':
- /* in postmaster and friends, stop if %x is seen */
+ case 'q':
+ /* in postmaster and friends, stop if %q is seen */
/* in a backend, just ignore */
if (MyProcPort == NULL)
i = format_len;
break;
+ case 'x':
+ if (MyProcPort)
+ {
+ if (IsTransactionState())
+ appendStringInfo(buf, "%u", GetTopTransactionId());
+ else
+ appendStringInfo(buf, "%u", InvalidTransactionId);
+ }
+ break;
case '%':
appendStringInfoChar(buf, '%');
break;