Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wItzJ-008dcg-2O for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2026 19:57:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wItzI-00CJv2-2k for pgsql-bugs@arkaria.postgresql.org; Fri, 01 May 2026 19:57:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wI35N-003DSu-0U for pgsql-bugs@lists.postgresql.org; Wed, 29 Apr 2026 11:28:09 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wI35K-00000003n4n-0dvl for pgsql-bugs@lists.postgresql.org; Wed, 29 Apr 2026 11:28:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=NqvZ1tKascFMIaU1jQUNu1Ccf4vD6tZH2MJVJJgCgig=; b=qwk1hySsbZxBLC2rnfHiDvUPZ4 T82hZ4F0yo2uu/zaT7TgTAnQC2jyHPTqw5OK5z3pNwdL5QpQw9yu6zN549sly5shTkWZURL4lGMIX S4OGiwX+rCO2oHCF11IURQQAFnCpEKN3EBZddvYiC56ZFtOR6rhYF9Zjv3dFhcv+yKOrA2vKc0tRu KFor7SX1o1PINlio3qZ4bdsrvAUKJ3s1g3S/tihQbnpbel5WPc3Sa7lv4i1eOIvMOlsfG1AalzZ0J FqLdXyvgyKTCxmw8mG1k79OlKH2HYFeIu8GyM8HrqjwLtEVwc5nZHP07VH61WWjdTTiw2JI2SKLZH pV754UNQ==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wI35I-00ABUU-1C for pgsql-bugs@lists.postgresql.org; Wed, 29 Apr 2026 11:28:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wI35G-005DSx-2O for pgsql-bugs@lists.postgresql.org; Wed, 29 Apr 2026 11:28:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19470: PostgreSQL backend aborts (assert failure) when a prepared statement returns a composite type cast t To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: haogangmao@gmail.com Reply-To: haogangmao@gmail.com, pgsql-bugs@lists.postgresql.org Date: Wed, 29 Apr 2026 11:27:19 +0000 Message-ID: <19470-0a344a5b356fc1a8@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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: =20 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: ... heap_deform_tuple()