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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands
Date: 2022-11-09 16:38:05
Message-ID: 3995893.1668011885@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> This has broken the following use:

> parse: create temporary table t1 (a int) on commit drop
> bind
> execute
> parse: analyze t1
> bind
> execute
> parse: select * from t1
> bind
> execute
> sync

> I think the behavior of IsInTransactionBlock() needs to be further
> refined to support this.

Hmm. Maybe the right way to think about this is "if we have completed an
EXECUTE, and not yet received a following SYNC, then report that we are in
a transaction block"? But I'm not sure if that breaks any other cases.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daisuke Higuchi (Fujitsu) 2022-11-10 01:27:55 RE: BUG #17681: Building the REL_12_13 source in Visual Studio 2013 fails.
Previous Message Peter Eisentraut 2022-11-09 16:24:43 Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-11-09 17:33:19 Re: Error for WITH options on partitioned tables
Previous Message Peter Eisentraut 2022-11-09 16:24:43 Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands