Re: Problem with transition tables on partitioned tables with foreign-table partitions
Etsuro Fujita <etsuro.fujita@gmail.com>
From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-09T08:06:39Z
Lists: pgsql-hackers
Attachments
- fix-problem-with-transition-tables-v2.patch (application/octet-stream) patch v2
On Tue, Jul 1, 2025 at 11:55 AM Etsuro Fujita <etsuro.fujita@gmail.com> wrote: > So I would > like to propose to fix this by the following: 1) disable using direct > modify to modify foreign-table partitions if there are any > transition-table triggers on the partitioned table, and then 2) throw > an error in ExecARInsertTriggers()/ExecARUpdateTriggers()/ExecARDeleteTriggers() > if they collects transition tuple(s) from a foreign-table partition. > > Attached is a WIP patch for that. Here is an updated version of the patch, in which I added 1) an Assert to ExecAR* functions to ensure that the passed-in ResultRelInfo pointer is not NULL, 2) added/tweaked comments a bit more, and 3) added regression tests. Best regards, Etsuro Fujita
Commits
-
Disallow collecting transition tuples from child foreign tables.
- b6641f7b0ebc 13.22 landed
- e94fc1a8ad0f 14.19 landed
- d642d23064ea 15.14 landed
- 9cca445dfd2c 16.10 landed
- 9048a83c7a2d 17.6 landed
- ce8817022713 18.0 landed
- 62a1211d3389 19 (unreleased) landed