| From: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com> |
|---|---|
| To: | haogangmao(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, PG Bug reporting form <noreply(at)postgresql(dot)org> |
| Subject: | Re: BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype |
| Date: | 2026-05-21 20:13:42 |
| Message-ID: | 9511d047-1a08-404b-a502-463fa599f152@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
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(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andreas Karlsson | 2026-05-21 20:51:19 | Re: BUG #19489: Function Name Conflict Between TimescaleDB and pg_stat_monitor Affecting Extension Upgrade |
| Previous Message | PetSerAl | 2026-05-21 18:41:51 | Re: BUG #19486: Regression in SQL-language functions using XML values and IS DOCUMENT |