From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Partitioning on the date part of a timestamp & PK issues
Date: Thu, 15 Jul 2021 22:45:12 -0500
Message-ID: <d5cd0231-32ab-540e-f354-45dd23ed4130@gmail.com> (raw)
In-Reply-To: <202107160253.va6esfntkuxr@alvherre.pgsql>
References: <202107160253.va6esfntkuxr@alvherre.pgsql>
On 7/15/21 9:53 PM, Alvaro Herrera wrote:
> On 2021-Jul-15, Ron wrote:
>
>> CREATE TABLE t (
>> guid uuid not null,
>> seq smallint not null,
>> tid smallint not null,
>> ts timestamp without time zone not null,
>> x real,
>> y real,
>> z real,
>> primary key (guid, tid, seq, ts)
>> ) partition by range (ts);
> This definition will let you have multiple rows for the same
> (guid,tid,seq) combination, as long as they have different ts values.
> That is at odds with the original formulation, in which there could be a
> single row with any given combination of those three columns.
That's the cost of partitioning by something other than uid, tid or seq.
--
Angular momentum makes the world go 'round.
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-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Partitioning on the date part of a timestamp & PK issues
In-Reply-To: <d5cd0231-32ab-540e-f354-45dd23ed4130@gmail.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