*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
# %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
+ # %s=session start timestamp %x=transaction id
+ # %q=stop here in non-session processes
# %%='%'
#log_statement = 'none' # none, mod, ddl, all
#log_hostname = false