File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1
1
<!--
2
- $PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.281 2004/09/17 22:40:46 tgl Exp $
2
+ $PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.282 2004/09/22 03:55:24 neilc Exp $
3
3
-->
4
4
5
5
<Chapter Id="runtime">
@@ -2394,6 +2394,11 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Win32
2394
2394
</row>
2395
2395
<row>
2396
2396
<entry><literal>%x</literal></entry>
2397
+ <entry>Transaction ID</entry>
2398
+ <entry>Yes</entry>
2399
+ </row>
2400
+ <row>
2401
+ <entry><literal>%q</literal></entry>
2397
2402
<entry>Does not produce any output, but tells non-session
2398
2403
processes to stop at this point in the string. Ignored by
2399
2404
session processes.</entry>
Original file line number Diff line number Diff line change 42
42
*
43
43
*
44
44
* IDENTIFICATION
45
- * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.150 2004/09/05 03:42:11 tgl Exp $
45
+ * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.151 2004/09/22 03:55:26 neilc Exp $
46
46
*
47
47
*-------------------------------------------------------------------------
48
48
*/
@@ -1421,12 +1421,21 @@ log_line_prefix(StringInfo buf)
1421
1421
MyProcPort -> remote_port );
1422
1422
}
1423
1423
break ;
1424
- case 'x ' :
1425
- /* in postmaster and friends, stop if %x is seen */
1424
+ case 'q ' :
1425
+ /* in postmaster and friends, stop if %q is seen */
1426
1426
/* in a backend, just ignore */
1427
1427
if (MyProcPort == NULL )
1428
1428
i = format_len ;
1429
1429
break ;
1430
+ case 'x' :
1431
+ if (MyProcPort )
1432
+ {
1433
+ if (IsTransactionState ())
1434
+ appendStringInfo (buf , "%u" , GetTopTransactionId ());
1435
+ else
1436
+ appendStringInfo (buf , "%u" , InvalidTransactionId );
1437
+ }
1438
+ break ;
1430
1439
case '%' :
1431
1440
appendStringInfoChar (buf , '%' );
1432
1441
break ;
Original file line number Diff line number Diff line change 231
231
# %r=remote host and port
232
232
# %p=PID %t=timestamp %i=command tag
233
233
# %c=session id %l=session line number
234
- # %s=session start timestamp
235
- # %x =stop here in non-session processes
234
+ # %s=session start timestamp %x=transaction id
235
+ # %q =stop here in non-session processes
236
236
# %%='%'
237
237
#log_statement = 'none' # none, mod, ddl, all
238
238
#log_hostname = false
You can’t perform that action at this time.
0 commit comments