Re: Problem with transition tables on partitioned tables with foreign-table partitions

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Problem with transition tables on partitioned tables with foreign-table partitions
Date: 2025-07-09 08:06:39
Message-ID: CAPmGK17yFaWi74ti4kt31iSE+cM6fd_hyW5qgRz=zXnFe9Ywag@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 1, 2025 at 11:55 AM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)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

Attachment Content-Type Size
fix-problem-with-transition-tables-v2.patch application/octet-stream 15.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-07-09 08:09:16 Re: Adding basic NUMA awareness - Preliminary feedback and outline for an extensible approach
Previous Message Alexandra Wang 2025-07-09 08:01:45 Re: SQL:2023 JSON simplified accessor support