Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1so97u-008dxj-OT for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 22:14:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1so97u-003HAn-8p for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 22:14:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1so97t-003HAa-UF for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2024 22:14:21 +0000 Received: from smtp93.ord1d.emailsrvr.com ([184.106.54.93]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1so97q-000XQP-9t for pgsql-general@postgresql.org; Tue, 10 Sep 2024 22:14:21 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp12.relay.ord1d.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id CD6F4E01AA for ; Tue, 10 Sep 2024 18:14:17 -0400 (EDT) From: Christophe Pettus Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Overlapping values (?) in multi-column partitioned tables Message-Id: <2FAC43EB-7E04-476A-BEBE-39CDBCA0EDCC@thebuild.com> Date: Tue, 10 Sep 2024 15:13:47 -0700 To: pgsql-general X-Mailer: Apple Mail (2.3774.600.62) X-Classification-ID: 66649691-154a-4f2c-a425-17302de0ded7-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I am clearly not understanding something. Consider: > xof=3D# create table t (pk bigint not null, ts timestamp not null) = partition by range (ts, pk); > CREATE TABLE > xof=3D# create table t1 partition of t for values from = ('2024-01-01'::timestamp, minvalue) to ('2024-02-01'::timestamp, = maxvalue); > CREATE TABLE > xof=3D# create table t2 partition of t for values from = ('2024-02-01'::timestamp, minvalue) to ('2024-03-01'::timestamp, = maxvalue); > ERROR: partition "t2" would overlap partition "t1" > LINE 1: ...on of t for values from ('2024-02-01'::timestamp, minvalue) = ... > ^ > xof=3D#=20 In what way do those partitions overlap? In other words, there does not = appear to be a value of (ts, pk) having '2024-01-01'::timestamp <=3D ts = < '2024-03-01'::timestamp for any pk where it would be ambiguous which = partition that row would go into. (I'm imagining it on a cartesian = plane, and there isn't any overlap between the rectangles those = partition boundaries define.) I'm obviously missing something, but... what? Thank you!=