From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Deadlock risk while inserting directly into partition? |
Date: | 2021-06-24 00:14:24 |
Message-ID: | 2557223.1624493664@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> On Thu, 24 Jun 2021 at 10:38, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I strongly disagree. That's essentially betting the whole farm on
>> our always being able to optimize parent-level operations fully,
>> which I do not think we are anywhere close to.
> Did you have anything in particular in mind here?
I don't think it's very hard to make up WHERE conditions that a person can
see select only one partition, but PG won't be able to figure that out.
> But... maybe there are some cases where a user can be certain that all
> interesting records are contained in a single partition but
> partitioning pruning cannot prove it...So maybe what you say is right.
> The workaround there would be to add a qual that allows pruning to
> work.
[ shrug... ] It's about as easy to just name the partition you want.
When planning overhead is considered, maybe it's a lot easier.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2021-06-24 00:32:33 | Re: Deadlock risk while inserting directly into partition? |
Previous Message | David Rowley | 2021-06-24 00:07:04 | Re: Deadlock risk while inserting directly into partition? |