BUG #19099: Conditional DELETE from partitioned table with non-updatable partition raises internal error
PG Bug reporting form <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Date: 2025-10-29T20:00:02Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix bogus ctid requirement for dummy-root partitioned targets
- f9a468c664a4 19 (unreleased) landed
- 9f4b7bfc5eb6 18.2 landed
- 933f67fb6a79 17.8 landed
- fab386f74888 16.12 landed
- 687533b39ecf 15.16 landed
- 6d2fa44d2a61 14.21 landed
The following bug has been logged on the website: Bug reference: 19099 Logged by: Alexander Lakhin Email address: exclusion@gmail.com PostgreSQL version: 18.0 Operating system: Ubuntu 24.04 Description: The following script: CREATE EXTENSION file_fdw; CREATE SERVER file_server FOREIGN DATA WRAPPER file_fdw; CREATE TABLE pt (a int, b text) partition by list (a); CREATE FOREIGN TABLE p1 partition of pt for values in (1) SERVER file_server OPTIONS (format 'csv', filename '/tmp/1.csv'); SET enable_partition_pruning = 'off'; EXPLAIN DELETE FROM pt WHERE false; raises: ERROR: XX000: could not find junk ctid column LOCATION: ExecInitModifyTable, nodeModifyTable.c:4867 (Discovered with SQLsmith.) Reproduced starting from 86dc9005. On 86dc9005~1 or with enable_partition_pruning = 'on', EXPLAIN outputs the query plan and "DELETE FROM pt WHERE false;" completes with no error.