Bug reference: 19468 Logged by: HaoGang Mao Email address: haogangmao@gmail.com PostgreSQL version: 17.3 Operating system: OS: Linux (Docker) Description:
Summary: PostgreSQL crashes with SIGSEGV when a cursor is open over a composite type and the type is modified via ALTER TYPE during the same transaction, followed by a second FETCH.
Reproduction steps (minimal): 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;
Expected: Error message (type modified during active cursor) Actual: Server process terminated with signal 11 (Segmentation fault)
Confirmed environment: PostgreSQL 18.3, built from source with --enable-cassert --enable-debug Docker image: sqleek-pg18-debug:18.3 Reproduction / stack script: report/postgres/get_stack3.sh Full stack output: report/postgres/crash_stack4.txt