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

From Alvaro Herrera
Subject Re: ON CONFLICT DO UPDATE for partitioned tables
Date
Msg-id 20180318041715.xvn6lwiv23pcdbny@alvherre.pgsql
Whole thread Raw
In response to Re: ON CONFLICT DO UPDATE for partitioned tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: ON CONFLICT DO UPDATE for partitioned tables  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Re: ON CONFLICT DO UPDATE for partitioned tables  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
Alvaro Herrera wrote:

> I think what I should be doing is the same as the returning stuff: keep
> a tupdesc around, and use a single slot, whose descriptor is changed
> just before the projection.

Yes, this works, though it's ugly.  Not any uglier than what's already
there, though, so I think it's okay.

The only thing that I remain unhappy about this patch is the whole
adjust_and_expand_partition_tlist() thing.  I fear we may be doing
redundant and/or misplaced work.  I'll look into it next week.

0001 should be pretty much ready to push -- adjustments to ExecInsert
  and ModifyTableState I already mentioned.

0002 is stuff I would like to get rid of completely -- changes to
  planner code so that it better supports functionality we need for
  0003.

0003 is the main patch.  Compared to the previous version, this one
  reuses slots by switching them to different tupdescs as needed.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [GSoC 2018] Proposal Draft
Next
From: Isaac Morland
Date:
Subject: Recently-introduced segfault in initdb?