From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw |
Date: | 2018-01-17 13:00:21 |
Message-ID: | 20180117130021.GC2416@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greetings Etsuro, Robert, all,
* Etsuro Fujita (fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp) wrote:
> (2017/11/01 11:16), Robert Haas wrote:
> >On Wed, Oct 4, 2017 at 5:58 PM, Ashutosh Bapat
> ><ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
> >>The view with WCO is local but the modification which violates WCO is
> >>being made on remote server by a trigger on remote table. Trying to
> >>control that doesn't seem to be a good idea, just like we can't
> >>control what rows get inserted on the foreign server when they violate
> >>local constraints.
> >
> >I think that's a fair point.
>
> For local constraints on foreign tables, it's the user's responsibility to
> ensure that those constraints matches the remote side, so we don't need to
> ensure those constraints locally. But I'm not sure if the same thing
> applies to WCOs on views defined on foreign tables, because in some case
> it's not possible to impose constraints on the remote side that match those
> WCOs, as I explained before.
Reviewing this thread, I tend to agree with Etsuro and I'm not sure I
see where there's a good argument for having a foreign table under a
view behave differently than a local table under a view for WCO (which
is an option of the view- not about the table underneath it or if it's
local or remote). I've not done a detailed review of the patch but it
seems pretty reasonable and pretty small.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2018-01-17 13:10:10 | Re: Setting BLCKSZ 4kB |
Previous Message | Stephen Frost | 2018-01-17 12:38:32 | Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)? |