Re: ON CONFLICT DO UPDATE for partitioned tables - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ON CONFLICT DO UPDATE for partitioned tables
Date
Msg-id CA+TgmoadhRyEYqv52Yb6nAN_cuzzaEX_utwQXhB7XWhcirYCUA@mail.gmail.com
Whole thread Raw
In response to ON CONFLICT DO UPDATE for partitioned tables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: ON CONFLICT DO UPDATE for partitioned tables  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
On Tue, Feb 27, 2018 at 7:46 PM, Alvaro Herrera
<alvherre@2ndquadrant.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


pgsql-hackers by date:

Previous
From: Anastasia Lubennikova
Date:
Subject: Reduce amount of WAL generated by CREATE INDEX for gist, gin andsp-gist
Next
From: Robert Haas
Date:
Subject: Re: Registering LWTRANCHE_PARALLEL_HASH_JOIN