Re: Huge memory consumption on partitioned table with FKs

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, keisuke kuroda <keisuke.kuroda.3862@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, tatsuhito.kasahara.rd@hco.ntt.co.jp
Date: 2021-03-10T19:24:57Z
Lists: pgsql-hackers
Amit Langote <amitlangote09@gmail.com> writes:
> On Wed, Mar 10, 2021 at 8:37 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Hmm.  So, the key point is that the values coming from the partitioned
>> child table are injected into the test query as parameters, not as
>> column references, thus it doesn't matter *to the test query* what
>> numbers the referencing columns have in that child.  We just have to
>> be sure we pass the right parameter values.

> Right.

I did some cosmetic fooling with this (mostly, rewriting the comments
YA time) and pushed it.

			regards, tom lane



Commits

  1. Avoid creating duplicate cached plans for inherited FK constraints.