| From: | Robert Haas <robertmhaas(at)gmail(dot)com> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
| Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: ON CONFLICT DO UPDATE for partitioned tables | 
| Date: | 2018-02-28 16:03:57 | 
| Message-ID: | CA+TgmoadhRyEYqv52Yb6nAN_cuzzaEX_utwQXhB7XWhcirYCUA@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Tue, Feb 27, 2018 at 7:46 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> I updated Amit Langote's patch for INSERT ON CONFLICT DO UPDATE[1].
> Following the lead of edd44738bc88 ("Be lazier about partition tuple
> routing.") this incarnation only does the necessary push-ups for the
> specific partition that needs it, at execution time.  As far as I can
> tell, it works as intended.
>
> I chose to refuse the case where the DO UPDATE clause causes the tuple
> to move to another partition (i.e. you're updating the partition key of
> the tuple).  While it's probably possible to implement that, it doesn't
> seem a very productive use of time.
I would have thought that to be the only case we could support with
the current infrastructure.  Doesn't a correct implementation for any
other case require a global index?
-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2018-02-28 16:49:01 | Re: Registering LWTRANCHE_PARALLEL_HASH_JOIN | 
| Previous Message | Anastasia Lubennikova | 2018-02-28 16:03:11 | Reduce amount of WAL generated by CREATE INDEX for gist, gin and sp-gist |