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 98a7beffe5b14b5f98f7aa68ddc3a1f29e6cb009..89163d6c86364a8b68e5b419242e85d8c219e704 100644 (file)
@@ -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;