Re: Huge memory consumption on partitioned table with FKs

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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-11T00:39:27Z
Lists: pgsql-hackers
On Thu, Mar 11, 2021 at 4:25 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Perfect.   Thanks for your time on this.

-- 
Amit Langote
EDB: http://www.enterprisedb.com



Commits

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