pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Derek Hans <derek.hans@gmail.com>
Subject: Re: Update does not move row across foreign partitions in v11
Date: Wed, 06 Mar 2019 12:29:24 +0900
Message-ID: <5C7F3E94.2060101@lab.ntt.co.jp> (raw)
In-Reply-To: <CAKJS1f-kwK71B8TV7tbe5dpbhVvR-7J5TqHCiQkw8pbwdwD-dw@mail.gmail.com>
References: <CAGrP7a3Xc1Qy_B2WJcgAD8uQTS_NDcJn06O5mtS_Ne1nYhBsyw@mail.gmail.com>
	<20190227193114.GA19279@alvherre.pgsql>
	<CAGrP7a0VhvM23m_kSsXUc1iAj4Z5DkyBaqq=fhxAS8VxNaFZ5w@mail.gmail.com>
	<CAKJS1f-kwK71B8TV7tbe5dpbhVvR-7J5TqHCiQkw8pbwdwD-dw@mail.gmail.com>

(2019/03/06 11:06), David Rowley wrote:
> On Tue, 5 Mar 2019 at 03:01, Derek Hans<derek.hans@gmail.com>  wrote:
>> Based on a reply to reporting this as a bug, moving rows out of foreign partitions is not yet implemented so this is behaving as expected. There's a mention of this limitation in the Notes section of the Update docs.
>
> (Moving this discussion to -Hackers)
>
> In [1], Derek reports that once a row is inserted into a foreign
> partition that an UPDATE does not correctly route it back out into the
> correct partition.
>
> I didn't really follow the foreign partition code when it went in, but
> do recall being involved in the documentation about the limitations of
> partitioned tables in table 5.10.2.3 in [2].  Unfortunately, table
> 5.10.2.3 does not seem to mention this limitation at all.  As Derek
> mentions, there is a brief mention in [3] in the form of:
>
> "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."
>
> I don't quite understand what a "foreign table to some other
> partition" is meant to mean. Partitions don't have foreign tables,
> they can only be one themselves.

I think "foreign table" is describing "partition" in front of that; "a 
partition that is a foreign table".

> I've tried to put all this right again in the attached. However, I was
> a bit unsure of what "but they can be moved into a foreign table if
> the foreign data wrapper supports it." is referring to. Copying Robert
> and Etsuro as this was all added in 3d956d9562aa. Hopefully, they can
> confirm what is meant by this.

That means that rows can be moved from a local partition to a foreign 
partition if the FDW supports it.

IMO, I think the existing mention in [3] is good, so I would vote for 
putting the same mention in table 5.10.2.3 in [2] as well.

Best regards,
Etsuro Fujita





view thread (33+ messages)  latest in thread

Message-ID: <5C7F3E94.2060101@lab.ntt.co.jp>
Permalink:  ../5C7F3E94.2060101@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/5C7F3E94.2060101@lab.ntt.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: fujita.etsuro@lab.ntt.co.jp, david.rowley@2ndquadrant.com, pgsql-hackers@lists.postgresql.org, robertmhaas@gmail.com, alvherre@2ndquadrant.com, derek.hans@gmail.com
  Subject: Re: Update does not move row across foreign partitions in v11
  In-Reply-To: <5C7F3E94.2060101@lab.ntt.co.jp>
  References: <CAGrP7a3Xc1Qy_B2WJcgAD8uQTS_NDcJn06O5mtS_Ne1nYhBsyw@mail.gmail.com> <20190227193114.GA19279@alvherre.pgsql> <CAGrP7a0VhvM23m_kSsXUc1iAj4Z5DkyBaqq=fhxAS8VxNaFZ5w@mail.gmail.com> <CAKJS1f-kwK71B8TV7tbe5dpbhVvR-7J5TqHCiQkw8pbwdwD-dw@mail.gmail.com> <5C7F3E94.2060101@lab.ntt.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox