Re: Release SPI plans for referential integrity with DISCARD ALL

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: yuzuko <yuzukohosoya(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Release SPI plans for referential integrity with DISCARD ALL
Date: 2021-01-19 06:56:26
Message-ID: CADkLM=eqGTy_Zi8n5RjxifmfogJbHxMOjeu0Vz_3M5xbLB6YTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 13, 2021 at 1:03 PM Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
wrote:

> In addition to that, a following case would be solved with this approach:
>> When many processes are referencing many tables defined foreign key
>> constraints thoroughly, a huge amount of memory will be consumed
>> regardless of whether referenced tables are partitioned or not.
>>
>> Attached the patch. Any thoughts?
>>
>
> Amit Langote has done some great work at eliminating SPI from
> INSERT/UPDATE triggers entirely, thus reducing the number of cached plans
> considerably.
>
> I think he was hoping to have a patch formalized this week, if time
> allowed.
>
> It doesn't have DELETE triggers in it, so this patch might still have good
> value for deletes on a commonly used enumeration table.
>
> However, our efforts might be better focused on eliminating SPI from
> delete triggers as well, an admittedly harder task.
>

Amit's patch is now available in this thread [1]. I'm curious if it has any
effect on your memory pressure issue.

[1]
https://www.postgresql.org/message-id/CA+HiwqGkfJfYdeq5vHPh6eqPKjSbfpDDY+j-kXYFePQedtSLeg@mail.gmail.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2021-01-19 06:57:58 RE: Parallel INSERT (INTO ... SELECT ...)
Previous Message Michael Paquier 2021-01-19 06:48:08 Re: ResourceOwner refactoring