Fix bad interaction between NOTIFY processing and V3 extended query

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 90b22029755121a61812e991838391bd40ba2bbf
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2003-10-16T16:50:41Z
Releases: 7.4.1
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.

Files

PathChange+/−
src/backend/access/transam/xact.c modified +30 −14
src/backend/commands/async.c modified +2 −6
src/backend/tcop/postgres.c modified +3 −3
src/include/access/xact.h modified +2 −1