public inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype
2+ messages / 2 participants
[nested] [flat]

* BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype
@ 2026-04-27 10:53 PG Bug reporting form <noreply@postgresql.org>
  2026-05-21 20:13 ` Re: BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype Matheus Alcantara <matheusssilv97@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2026-04-27 10:53 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: haogangmao@gmail.com

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;
```








^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype
  2026-04-27 10:53 BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype PG Bug reporting form <noreply@postgresql.org>
@ 2026-05-21 20:13 ` Matheus Alcantara <matheusssilv97@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Matheus Alcantara @ 2026-05-21 20:13 UTC (permalink / raw)
  To: haogangmao@gmail.com; pgsql-bugs@lists.postgresql.org; PG Bug reporting form <noreply@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






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-05-21 20:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-04-27 10:53 BUG #19469: Prevent SIGSEGV on FETCH after ALTER TYPE of cursor rowtype PG Bug reporting form <noreply@postgresql.org>
2026-05-21 20:13 ` Matheus Alcantara <matheusssilv97@gmail.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox