Re: Transparent partitioning

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Bráulio Bhavamitra <brauliobo(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transparent partitioning
Date: 2018-06-12 18:26:40
Message-ID: bcc7e40c-e5a5-86f1-02d6-89e2084caeb1@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2018-06-12 18:31:50 Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Previous Message Jernigan, Kevin 2018-06-12 18:14:34 Re: PG on AWS RDS and IAM authentication