]> granicus.if.org Git - postgresql/commitdiff
Make the log output of 'vxid' between csvlog and stderr/syslog
authorBruce Momjian <bruce@momjian.us>
Wed, 7 Jan 2009 04:26:46 +0000 (04:26 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 7 Jan 2009 04:26:46 +0000 (04:26 +0000)
consistent. Currently, in csvlog, vxid of an auxiliary process isn't
displayed. On the other hand, in stderr/syslog, invalid vxid (-1/0) of
that is displayed.

Fujii Masao

src/backend/utils/error/elog.c

index 2551c5fbffc7d2f922d3afada06cc940644a26f3..a4a19967bab80dba267b76e445e853cc6c160ff2 100644 (file)
@@ -42,7 +42,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.210 2009/01/01 17:23:51 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.211 2009/01/07 04:26:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1693,7 +1693,7 @@ log_line_prefix(StringInfo buf)
                                break;
                        case 'v':
                                /* keep VXID format in sync with lockfuncs.c */
-                               if (MyProc != NULL)
+                               if (MyProc != NULL && MyProc->backendId != InvalidBackendId)
                                        appendStringInfo(buf, "%d/%u",
                                                                         MyProc->backendId, MyProc->lxid);
                                break;