Re: [HACKERS] MERGE SQL Statement for PG11

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Peter Geoghegan <pg(at)bowt(dot)ie>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] MERGE SQL Statement for PG11
Date: 2018-03-27 09:31:33
Message-ID: CABOikdOTdLB94heeS13UephP7-UMzo-nFsrdmOnNLRROGJmjtQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 27, 2018 at 1:54 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:

> On 26 March 2018 at 17:06, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > On 26 March 2018 at 15:39, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
> wrote:
> >
>
> > That's all I can see so far.
>
> * change comment “once to” to “once” in src/include/nodes/execnodes.h
> * change comment “and to run” to “and once to run”
> * change “result relation” to “target relation”
>

Fixed all of that in the patch v26 set I just sent.

>
> * XXX we probably need to check plan output for CMD_MERGE also
>

Yeah. Added those checks for MERGE action's target lists in v26.

>
> * Spurious line feed in src/backend/optimizer/prep/preptlist.c
>

Couldn't spot it. Will look closer, but any hint will be appreciated.

>
> * No need to remove whitespace in src/backend/optimizer/util/relnode.c
>

Fixed in v26.

>
> * README should note that the TABLEOID junk column is not strictly
> needed when joining to a non-partitioned table but we don't try to
> optimize that away. Is that an XXX to fix in future or do we just
> think the extra 4 bytes won't make much difference so we leave it?
>

I actually took the opportunity to conditionally fetch tableoid only if we
are dealing with partitioned table.

>
> * Comment in rewriteTargetListMerge() should mention TABLEOID exists
> to allow us to find the correct relation, not the correct row, comment
> just copied from CTID above it.
>
>
Fixed in v26.

Thanks,
Pavan

--
Pavan Deolasee http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2018-03-27 09:35:44 Re: Re: csv format for psql
Previous Message Pavan Deolasee 2018-03-27 09:28:36 Re: [HACKERS] MERGE SQL Statement for PG11