Re: Huge memory consumption on partitioned table with FKs

Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>

From: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
To: Amit Langote <amitlangote09@gmail.com>, 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>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, tatsuhito.kasahara.rd@hco.ntt.co.jp
Date: 2021-03-11T06:10:04Z
Lists: pgsql-hackers
On 2021/03/11 9:39, Amit Langote wrote:
> 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.


Thanks for fixing the problem! :-D


Regards,
Tatsuro Yamada




Commits

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