On Wed, Oct 30, 2024 at 04:06:20PM +0100, Jelte Fennema-Nio wrote:
> On Wed, 30 Oct 2024 at 10:15, Anthonin Bonnefoy
> <anthonin.bonne...@datadoghq.com> wrote:
>> The attached patch adds the detection of implicit transactions started
>> by a pipeline in CheckTransactionBlock, avoiding warnings when
>> commands like `set local` are called within a pipeline, and making the
>> detection of transaction block coherent with what's done in
>> IsInTransactionBlock and PreventInTransactionBlock.
> 
> +1 seems like a reasonable change.

That's indeed a bit strange.  I think that you're right.

@Tom added in CC: Is there a specific reason why CheckTransactionBlock()
did not include a check based on XACT_FLAGS_PIPELINING when it got
introduced in 20432f873140, while IsInTransactionBlock() considers it?

This was discussed here:
https://www.postgresql.org/message-id/flat/17434-d9f7a064ce2a88a3%40postgresql.org
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to