Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: nagata@sraoss.co.jp, pgsql-bugs@lists.postgresql.org
Date: 2022-07-15T00:36:54Z
Lists: pgsql-bugs, pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Did we make any decision on this?

Hmm, that one seems to have slipped past me.  I agree it doesn't
look good.  But why isn't the PreventInTransactionBlock() check
blocking the command from even starting?

			regards, tom lane



Commits

  1. Rethink handling of [Prevent|Is]InTransactionBlock in pipeline mode.

  2. Doc: add comments about PreventInTransactionBlock/IsInTransactionBlock.

  3. Force immediate commit after CREATE DATABASE etc in extended protocol.