aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-10-16 16:50:41 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-10-16 16:50:41 +0000
commit90b22029755121a61812e991838391bd40ba2bbf (patch)
tree201dc497b0516616e1ff07403a77a5c367073f49 /src/backend/tcop/postgres.c
parent839cea8814ca8fc19aed01eface17c4ec9466218 (diff)
downloadpostgresql-90b22029755121a61812e991838391bd40ba2bbf.tar.gz
postgresql-90b22029755121a61812e991838391bd40ba2bbf.zip
Fix bad interaction between NOTIFY processing and V3 extended query
protocol, per report from Igor Shevchenko. NOTIFY thought it could do its thing if transaction blockState is TBLOCK_DEFAULT, but in reality it had better check the low-level transaction state is TRANS_DEFAULT as well. Formerly it was not possible to wait for the client in a state where the first is true and the second is not ... but now we can have such a state. Minor cleanup in StartTransaction() as well.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 9c0af0d238b..ea247487e2c 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.372 2003/10/09 02:40:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.373 2003/10/16 16:50:41 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -2660,7 +2660,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.372 $ $Date: 2003/10/09 02:40:18 $\n");
+ puts("$Revision: 1.373 $ $Date: 2003/10/16 16:50:41 $\n");
}
/*
@@ -2796,7 +2796,7 @@ PostgresMain(int argc, char *argv[], const char *username)
{
pgstat_report_tabstat();
- if (IsTransactionBlock())
+ if (IsTransactionOrTransactionBlock())
{
set_ps_display("idle in transaction");
pgstat_report_activity("<IDLE> in transaction");