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

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Robert Haas <robertmhaas@gmail.com>, Derek Hans <derek.hans@gmail.com>
Date: 2019-03-08T14:43:29Z
Lists: pgsql-hackers, pgsql-general

Attachments

On Fri, Mar 8, 2019 at 11:09 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> On 2019-Mar-08, Amit Langote wrote:
>
> > diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml
> > index 77430a586c..f5cf8eab85 100644
> > --- a/doc/src/sgml/ref/update.sgml
> > +++ b/doc/src/sgml/ref/update.sgml
> > @@ -291,9 +291,9 @@ UPDATE <replaceable class="parameter">count</replaceable>
> >     concurrent <command>UPDATE</command> or <command>DELETE</command> on the
> >     same row may miss this row. For details see the section
> >     <xref linkend="ddl-partitioning-declarative-limitations"/>.
> > -   Currently, rows cannot be moved from a partition that is a
> > -   foreign table to some other partition, but they can be moved into a foreign
> > -   table if the foreign data wrapper supports it.
> > +   While rows can be moved from local partitions to a foreign-table partition
> > +   partition (provided the foreign data wrapper supports tuple routing), they
> > +   cannot be moved from a foreign-table partition to some other partition.
> >    </para>
> >   </refsect1>
>
> LGTM.  Maybe I'd change "some other" to "another", but maybe on a
> different phase of the moon I'd leave it alone.

Done.

> 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?

Actually, I remember commenting *against* having that text in
ddl.sgml, but it got in there anyway.

> 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.  Should we start now by listing this UPDATE row
movement limitation?

Anyway, I've only attached the patch for update.sgml this time.

Thanks,
Amit

Commits

  1. Fix documentation on partitioning vs. foreign tables