BUG #19470: PostgreSQL backend aborts (assert failure) when a prepared statement returns a composite type cast t - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #19470: PostgreSQL backend aborts (assert failure) when a prepared statement returns a composite type cast t
Date
Msg-id 19470-0a344a5b356fc1a8@postgresql.org
Whole thread
Responses Re: BUG #19470: PostgreSQL backend aborts (assert failure) when a prepared statement returns a composite type cast t
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      19470
Logged by:          HaoGang Mao
Email address:      haogangmao@gmail.com
PostgreSQL version: 18.3
Operating system:   Linux
Description:

Reproduction steps (minimal):
  BEGIN;
  CREATE TYPE foo AS (a int, b text);
  PREPARE p AS SELECT CAST(ROW(1, 'hello') AS foo)::text;
  EXECUTE p;
  ALTER TYPE foo ALTER ATTRIBUTE a TYPE VARCHAR(100);
  EXECUTE p;
  COMMIT;

Expected: Error message (type modified while a prepared plan / expression is
active)
Actual:   Server connection dropped; backend aborts with SIGABRT due to
assertion failure

Server log (trimmed):
  TRAP: failed Assert("false"), File: "heaptuple.c", Line: 1417, PID: <pid>
  ... heap_deform_tuple()





pgsql-bugs by date:

Previous
From: Siddharth Kothari
Date:
Subject: Fix size estimation for parallel B-Tree scans with skip arrays
Next
From: Gary Clarke
Date:
Subject: Interval unit format bug