From 76653134ae87c7c08e1eb58da07af9f64ec78ccb Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Thu, 28 Nov 2024 09:43:22 +0900 Subject: Revert "Handle better implicit transaction state of pipeline mode" This reverts commit d77f91214fb7 on all stable branches, due to concerns regarding the compatility side effects this could create in a minor release. The change still exists on HEAD. Discussion: https://postgr.es/m/CA+TgmoZqRgeFTg4+Yf_CMRRXiHuNz1u6ZC4FvVk+rxw0RmOPnw@mail.gmail.com Backpatch-through: 13 --- src/backend/tcop/postgres.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 26aaaf19e19..3f427f1b47f 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2780,17 +2780,6 @@ start_xact_command(void) xact_started = true; } - else if (MyXactFlags & XACT_FLAGS_PIPELINING) - { - /* - * When the first Execute message is completed, following commands - * will be done in an implicit transaction block created via - * pipelining. The transaction state needs to be updated to an - * implicit block if we're not already in a transaction block (like - * one started by an explicit BEGIN). - */ - BeginImplicitTransactionBlock(); - } /* * Start statement timeout if necessary. Note that this'll intentionally @@ -4929,13 +4918,6 @@ PostgresMain(const char *dbname, const char *username) case 'S': /* sync */ pq_getmsgend(&input_message); - - /* - * If pipelining was used, we may be in an implicit - * transaction block. Close it before calling - * finish_xact_command. - */ - EndImplicitTransactionBlock(); finish_xact_command(); valgrind_report_error_query("SYNC message"); send_ready_for_query = true; -- cgit v1.2.3