Re: Killing off removed rels properly
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-02-20T16:33:28Z
Lists: pgsql-hackers
Alexander Lakhin <exclusion@gmail.com> writes: > After this change the following query triggers an assert: > CREATE TABLE tt (tid integer PRIMARY KEY) PARTITION BY LIST (tid); > CREATE TABLE ttp PARTITION OF tt DEFAULT; > CREATE TABLE st (sid integer); > MERGE INTO tt USING st ON tt.tid = st.sid WHEN NOT MATCHED THEN INSERT > VALUES (st.sid); Hmph. Yeah, I think that's just wrong: the cases of found-a-baserel and didn't-find-a-baserel should be treating MERGE-rejection identically. This is probably broken even before e9a20e451. Thanks for the report! regards, tom lane
Commits
-
Prevent join removal from removing the query's result relation.
- f6db76c55509 16.0 landed
- e6d8639cf25c 15.3 landed
-
Remove gratuitous assumptions about what make_modifytable can see.
- c6c3b3bc3de1 16.0 landed
-
When removing a relation from the query, drop its RelOptInfo.
- e9a20e451f3a 16.0 landed
-
Allow left join removals and unique joins on partitioned tables
- 3c569049b7b5 16.0 cited