Fix bad interaction between NOTIFY processing and V3 extended query
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| 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 |