From: Adrian Klaver <adrian.klaver@aklaver.com>
To: BrĂ¡ulio Bhavamitra <brauliobo@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Transparent partitioning
Date: Tue, 12 Jun 2018 11:26:40 -0700
Message-ID: <bcc7e40c-e5a5-86f1-02d6-89e2084caeb1@aklaver.com> (raw)
In-Reply-To: <CAJri6_tUj2a5JstV50nCrW+mZ3WF1m8BqEfwF6=u4Ld-Vw6_qA@mail.gmail.com>
References: <CAJri6_tUj2a5JstV50nCrW+mZ3WF1m8BqEfwF6=u4Ld-Vw6_qA@mail.gmail.com>
On 06/12/2018 11:12 AM, BrĂ¡ulio Bhavamitra wrote:
> Hi postgresql developers,
>
> Are there any plans to have transparent partitioning through clustered
> indexes in such a way that a table is partitioned in the backend
> according to a clustering index without any further user configuration?
Something like this?:
https://www.postgresql.org/docs/10/static/sql-createtable.html
"PARTITION BY { RANGE | LIST } ( { column_name | ( expression ) } [
opclass ] [, ...] )
The optional PARTITION BY clause specifies a strategy of
partitioning the table. The table thus created is called a partitioned
table. The parenthesized list of columns or expressions forms the
partition key for the table. When using range partitioning, the
partition key can include multiple columns or expressions (up to 32, but
this limit can be altered when building PostgreSQL), but for list
partitioning, the partition key must consist of a single column or
expression. If no B-tree operator class is specified when creating a
partitioned table, the default B-tree operator class for the datatype
will be used. If there is none, an error will be reported.
A partitioned table is divided into sub-tables (called partitions),
which are created using separate CREATE TABLE commands. The partitioned
table is itself empty. A data row inserted into the table is routed to a
partition based on the value of columns or expressions in the partition
key. If no existing partition matches the values in the new row, an
error will be reported.
Partitioned tables do not support UNIQUE, PRIMARY KEY, EXCLUDE, or
FOREIGN KEY constraints; however, you can define these constraints on
individual partitions.
"
>
> Best regards,
> Braulio Oliveira
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, brauliobo@gmail.com
Subject: Re: Transparent partitioning
In-Reply-To: <bcc7e40c-e5a5-86f1-02d6-89e2084caeb1@aklaver.com>
References: <CAJri6_tUj2a5JstV50nCrW+mZ3WF1m8BqEfwF6=u4Ld-Vw6_qA@mail.gmail.com> <bcc7e40c-e5a5-86f1-02d6-89e2084caeb1@aklaver.com>
* 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