Re: 9.5 release notes may need ON CONFLICT DO NOTHING compatibility notice for FDW authors

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: 9.5 release notes may need ON CONFLICT DO NOTHING compatibility notice for FDW authors
Date: 2015-05-25 08:28:55
Message-ID: CANP8+jJpoiHKOwh7p3p6LD0_aea6MbKvuXNSXcJOmoincdw7Lg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25 May 2015 at 00:22, Peter Geoghegan <pg(at)heroku(dot)com> wrote:

>
> There is no support for ON CONFLICT DO UPDATE with postgres_fdw, but
> that's really only because an inference specification (or explicitly
> named constraint) is always required for DO UPDATE. The deparsing
> support actually added will have deparsing add "ON CONFLICT DO
> NOTHING" for the SQL generated for execution on foreign servers if the
> original statement had that exact, unadorned ON CONFLICT clause. As
> things stand, every other possible ON CONFLICT clause will throw an
> error in some way before the FDW is consulted at all, so FDW authors
> need not concern themselves with those other cases (unless perhaps we
> allow ON CONFLICT DO UPDATE to not require an inference specification
> in a last minute behavioral tweak, as suggested by Simon Riggs, making
> ON CONFLICT DO UPDATE support by foreign data wrappers a possibility
> that must be considered).
>

My earlier summary was that the support for multiple constraints has been
poorly thought through. This is an example of the breakage I have been
complaining about when we are forced to specify the constraint
(conflict-target).

This is not just related to FDWs and should not be fixed solely for FDWs.
This was already an open item for me in 9.5, now even more so.

My comments do not come at the last minute, what Peter means is that we
should make a change now in response to the concerns I have previously
raised.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2015-05-25 09:08:55 Construction of Plan-node by CSP (RE: Custom/Foreign-Join-APIs)
Previous Message Stefan Kaltenbrunner 2015-05-25 07:12:35 Re: problems on Solaris