[GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions - Mailing list pgsql-general

From Stephen Froehlich
Subject [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions
Date
Msg-id CY1PR0601MB19270B46449D9C978B05998EE55E0@CY1PR0601MB1927.namprd06.prod.outlook.com
Whole thread Raw
Responses Re: [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions
List pgsql-general

So I have a table that has two fields I want to partition by:

 

CREATE TABLE lotsa_data (

start_time   timestamp with time zone,

source_no    integer,

counter      integer)

PARTITION BY RANGE (start_time, source_no);

 

CREATE TABLE lotsa_data_20171027_src1 PARTITION OF lotsa_data

    FOR VALUES FROM ('2017-10-26 18:00:00-06', 1) TO ('2017-10-27 17:59:59.999-06', 1);

(Works fine)

 

CREATE TABLE lotsa_data_20171027_src3 PARTITION OF lotsa_data

    FOR VALUES FROM ('2017-10-26 18:00:00-06', 3) TO ('2017-10-27 17:59:59.999-06', 3);

 

ERROR: partition " lotsa_data_20171027_src1" would overlap partition "lotsa_data_20171027_src3"

 

Why am I getting this error?  (Also, if I go “FROM (‘2017-10-26 00:00:00 UTC’) TO (‘2017-10-27 00:00:00 UTC’)” I also get overlap errors.

 

Thanks for your help …

--Stephen

 

Stephen Froehlich
Sr. Strategist, CableLabs®


s.froehlich@cablelabs.com

Tel: +1 (303) 661-3708

 

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: [GENERAL] query not scaling
Next
From: Michael Paquier
Date:
Subject: Re: [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions