From: David Fetter <david@fetter.org>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Simon Riggs <simon@2ndQuadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Declarative partitioning
Date: Thu, 20 Aug 2015 14:27:00 -0700
Message-ID: <20150820212700.GC8691@fetter.org> (raw)
In-Reply-To: <55D53885.7070608@lab.ntt.co.jp>
References: <55D3093C.5010800@lab.ntt.co.jp>
<CANP8+j+FqaepassKVpQtG_KU_XqFka8grZYULyT7yuYdgz++2w@mail.gmail.com>
<55D53885.7070608@lab.ntt.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Thu, Aug 20, 2015 at 11:16:37AM +0900, Amit Langote wrote:
> On 2015-08-19 PM 09:23, Simon Riggs wrote:
> > On 18 August 2015 at 11:30, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
> > wrote:
> > You haven't specified what would happen if an UPDATE would change a row's
> > partition. I'm happy to add this to the list of restrictions by saying that
> > the partition key cannot be updated.
>
> UPDATEs that change a row's partition would cause error. I haven't
> implemented that yet but will that way in the next patch.
>
> By the last sentence, do you mean only UPDATEs to the partition key that
> cause rows to jump partitions or simply any UPDATEs to the partition key?
I don't know what Simon had in mind, but it seems to me that we have
the following in descending order of convenience to users, and I
presume, descending order of difficulty of implementation:
1. Updates propagate transparently, moving rows between partitions if needed.
2. Updates fail only if the change to a partition key would cause the
row to have to move to another partition.
3. All updates to the partition key fail.
Whichever of these we choose, we should document it with great
clarity.
> > We'll need regression tests that cover each restriction and docs
> > that match. This is not something we should leave until last.
> > People read the docs to understand the feature, helping them to
> > reach consensus. So it is for you to provide the docs before, not
> > wait until later. I will begin a code review once you tell me docs
> > and tests are present. We all want the feature, so its all about
> > the details now.
>
> Sorry, should have added tests and docs already. I will add them in
> the next version of the patch. Thanks for willing to review.
Docs and tests are crucial, and thanks again for taking this on.
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david@fetter.org, Langote_Amit_f8@lab.ntt.co.jp, simon@2ndQuadrant.com
Subject: Re: Declarative partitioning
In-Reply-To: <20150820212700.GC8691@fetter.org>
* 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