public inbox for pgsql-bugs@postgresql.org
help / color / mirror / Atom feedFrom: Matheus Alcantara <matheusssilv97@gmail.com>
To: haogangmao@gmail.com
To: pgsql-bugs@lists.postgresql.org
To: PG Bug reporting form <noreply@postgresql.org>
Subject: Re: BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype
Date: Thu, 21 May 2026 17:13:42 -0300
Message-ID: <9511d047-1a08-404b-a502-463fa599f152@gmail.com> (raw)
In-Reply-To: <19469-e7612f56d0e1ce34@postgresql.org>
References: <19469-e7612f56d0e1ce34@postgresql.org>
On 27/04/26 07:53, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 19469
> Logged by: HaoGang Mao
> Email address: haogangmao@gmail.com
> PostgreSQL version: 17.3
> Operating system: OS: Linux (Docker)
> Description:
>
> An open cursor can continue returning tuples built with the old physical
> layout of a named composite type. If that type is changed in the same
> transaction (for example ALTER TYPE ... ALTER ATTRIBUTE ... TYPE), a later
> FETCH may format the tuple using updated descriptor and output metadata.
>
> Minimal Reproduction SQL:
> ```sql
> CREATE TYPE foo AS (a INT, b INT);
> BEGIN;
> DECLARE c CURSOR FOR
> SELECT (i, power(2, 30))::foo
> FROM generate_series(1,10) i;
> FETCH c;
> ALTER TYPE foo ALTER ATTRIBUTE b TYPE TEXT;
> FETCH c;
> COMMIT;
> ```
It looks the same as as [1] and [2]
[1]
https://www.postgresql.org/message-id/19466-dc32827173299fd4%40postgresql.org
[2]
https://www.postgresql.org/message-id/19382-4c2060ffee72759b%40postgresql.org
--
Matheus Alcantara
EDB: https://www.enterprisedb.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: matheusssilv97@gmail.com, haogangmao@gmail.com, pgsql-bugs@lists.postgresql.org, noreply@postgresql.org
Subject: Re: BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype
In-Reply-To: <9511d047-1a08-404b-a502-463fa599f152@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox