Re: ON CONFLICT DO UPDATE for partitioned tables

Amit Langote <langote_amit_f8@lab.ntt.co.jp>

From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Pavan Deolasee <pavan.deolasee@gmail.com>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>, Andres Freund <andres@anarazel.de>, Pg Hackers <pgsql-hackers@postgresql.org>, Peter Geoghegan <pg@bowt.ie>
Date: 2018-04-18T04:35:02Z
Lists: pgsql-hackers

Attachments

On 2018/04/18 0:04, Alvaro Herrera wrote:
> Amit Langote wrote:
> 
>> I just confirmed my hunch that this wouldn't somehow do the right thing
>> when the OID system column is involved.  Like this case:
> 
> This looks too big a patch to pursue now.  I'm inclined to just remove
> the equalTupdesc changes.

OK.  Here is the patch that removes equalTupdesc optimization.

I will add the rest of the patch to the next CF after starting a new
thread for it sometime later.

Thanks,
Amit

Commits

  1. Remove quick path in ExecInitPartitionInfo for equal tupdescs

  2. Ignore whole-rows in INSERT/CONFLICT with partitioned tables

  3. Handle INSERT .. ON CONFLICT with partitioned tables

  4. Remove unnecessary members from ModifyTableState and ExecInsert