From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, keisuke(dot)kuroda(dot)3862(at)gmail(dot)com, tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp, pgsql-hackers(at)lists(dot)postgresql(dot)org, amitlangote09(at)gmail(dot)com, tatsuhito(dot)kasahara(dot)rd(at)hco(dot)ntt(dot)co(dot)jp |
Subject: | Re: Huge memory consumption on partitioned table with FKs |
Date: | 2020-12-01 03:25:30 |
Message-ID: | CADkLM=fRKPAoThYX+g2PP9spv6=-NdO=ckXM8i1XkjcFb2ON+w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 30, 2020 at 9:48 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Corey Huinker <corey(dot)huinker(at)gmail(dot)com> writes:
> > Given that we're already looking at these checks, I was wondering if this
> > might be the time to consider implementing these checks by directly
> > scanning the constraint index.
>
> Yeah, maybe. Certainly ri_triggers is putting a huge amount of effort
> into working around the SPI/parser/planner layer, to not a lot of gain.
>
> However, it's not clear to me that that line of thought will work well
> for the statement-level-trigger approach. In that case you might be
> dealing with enough tuples to make a different plan advisable.
>
> regards, tom lane
>
Bypassing SPI would probably mean that we stay with row level triggers, and
the cached query plan would go away, perhaps replaced by an
already-looked-up-this-tuple hash sorta like what the cached nested loops
effort is doing.
I've been meaning to give this a try when I got some spare time. This may
inspire me to try again.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2020-12-01 03:26:49 | Re: Printing backtrace of postgres processes |
Previous Message | Krunal Bauskar | 2020-12-01 03:25:27 | Re: Improving spin-lock implementation on ARM. |