Re: BUG #19085: Using EXECUTE to run a multi-statement SQL string causes an assertion failure - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19085: Using EXECUTE to run a multi-statement SQL string causes an assertion failure
Date
Msg-id 894012.1760420045@sss.pgh.pa.us
Whole thread Raw
In response to BUG #19085: Using EXECUTE to run a multi-statement SQL string causes an assertion failure  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> The issue is triggered by a PL/pgSQL procedure that dynamically executes a
> multi-statement SQL string via EXECUTE, combining DECLARE CURSOR and FETCH
> (e.g., "DECLARE test_cursor_1_1 CURSOR FOR SELECT * FROM test_table_1; FETCH
> 200 FROM test_cursor_1_1"). This fails with
> Assert(ActiveSnapshot->as_snap->regd_count == 0) in snapmgr.c:754 because
> the snapshot's registration count (regd_count) reaches 2 during SPI's
> multi-statement processing loop.

I cannot reproduce this assertion, either in master or REL_18_STABLE
branch tip.  Are you testing community Postgres, or some locally
modified version?

            regards, tom lane



pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: TRAP: failed Assert("outerPlan != NULL") in postgres_fdw.c
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Logical replication fails when partition column order differs from parent