Re: Update does not move row across foreign partitions in v11

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Derek Hans <derek(dot)hans(at)gmail(dot)com>
Subject: Re: Update does not move row across foreign partitions in v11
Date: 2019-03-08 16:13:17
Message-ID: CA+HiwqH5W-odeEVn3DXYi2C8t+4JvLsN2wGAEzrw_c2hwS72AA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sat, Mar 9, 2019 at 12:03 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> On 2019-Mar-08, Amit Langote wrote:
>
> > On Fri, Mar 8, 2019 at 11:09 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> > > I'm not sure about copying the same to ddl.sgml. Why is that needed?
> > > Update is not DDL.
> >
> > Hmm, maybe because there's already a huge block of text describing
> > certain limitations of UPDATE row movement under concurrency?
>
> Uh, you're right, there is. That seems misplaced :-( I'm not sure it
> even counts as a "limitation"; it seems to belong to the NOTES section
> of UPDATE rather than where it is now.
>
> > Actually, I remember commenting *against* having that text in
> > ddl.sgml, but it got in there anyway.
>
> We can move it now ...
>
> > > ddl.sgml does say this: "Partitions can also be
> > > foreign tables, although they have some limitations that normal tables
> > > do not; see CREATE FOREIGN TABLE for more information." which suggests
> > > that the limitation might need to be added to create_foreign_table.sgml.
> >
> > Actually, that "more information" never got added to
> > create_foreign_table.sgml. There should've been some text about the
> > lack for tuple routing at least in PG 10's docs, but I guess that
> > never happened.
>
> Sigh.
>
> Since version 10 is going to be supported for a few years still, maybe
> we should add it there.
>
> > Should we start now by listing this UPDATE row movement limitation?
>
> I think we should, yes.

Attached find 3 patches -- for PG 10, 11, and HEAD. I also realizes
that a description of PARTITION OF clause was also missing in the
Parameters section of CREATE FOREIGN TABLE, which is fixed too.

Thanks,
Amit

Attachment Content-Type Size
HEAD-foreign-table-limitations.patch application/octet-stream 5.2 KB
pg11-foreign-table-limitations.patch application/octet-stream 5.2 KB
pg10-foreign-table-limitations.patch application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexandru Lazarev 2019-03-08 16:40:27 Re: Hot to model data in DB (PostgreSQL) for SNMP-like multiple configurations
Previous Message Alban Hertroys 2019-03-08 15:15:35 Re: Hot to model data in DB (PostgreSQL) for SNMP-like multiple configurations

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2019-03-08 16:25:49 Re: Problems with plan estimates in postgres_fdw
Previous Message Amit Khandekar 2019-03-08 15:29:29 Re: Minimal logical decoding on standbys