Index: src/backend/utils/error/elog.c =================================================================== RCS file: /home/alvherre/cvs/pgsql-server/src/backend/utils/error/elog.c,v retrieving revision 1.150 diff -c -r1.150 elog.c *** src/backend/utils/error/elog.c 5 Sep 2004 03:42:11 -0000 1.150 --- src/backend/utils/error/elog.c 11 Sep 2004 03:31:14 -0000 *************** *** 1421,1432 **** MyProcPort->remote_port); } break; ! case 'x': ! /* in postmaster and friends, stop if %x is seen */ /* in a backend, just ignore */ if (MyProcPort == NULL) i = format_len; break; case '%': appendStringInfoChar(buf, '%'); break; --- 1421,1441 ---- MyProcPort->remote_port); } break; ! 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; Index: doc/src/sgml/runtime.sgml =================================================================== RCS file: /home/alvherre/cvs/pgsql-server/doc/src/sgml/runtime.sgml,v retrieving revision 1.280 diff -c -r1.280 runtime.sgml *** doc/src/sgml/runtime.sgml 31 Aug 2004 04:53:43 -0000 1.280 --- doc/src/sgml/runtime.sgml 11 Sep 2004 03:29:49 -0000 *************** *** 2375,2380 **** --- 2375,2385 ---- %x + Transaction ID + Yes + + + %q Does not produce any output, but tells non-session processes to stop at this point in the string. Ignored by session processes. Index: src/backend/utils/misc/postgresql.conf.sample =================================================================== RCS file: /home/alvherre/cvs/pgsql-server/src/backend/utils/misc/postgresql.conf.sample,v retrieving revision 1.127 diff -c -r1.127 postgresql.conf.sample *** src/backend/utils/misc/postgresql.conf.sample 31 Aug 2004 04:53:44 -0000 1.127 --- src/backend/utils/misc/postgresql.conf.sample 11 Sep 2004 03:40:30 -0000 *************** *** 227,234 **** # %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 # %%='%' #log_statement = 'none' # none, mod, ddl, all #log_hostname = false --- 227,234 ---- # %r=remote host and port # %p=PID %t=timestamp %i=command tag # %c=session id %l=session line number ! # %s=session start timestamp %x=transaction id ! # %q=stop here in non-session processes # %%='%' #log_statement = 'none' # none, mod, ddl, all #log_hostname = false