public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: Jonathan Reis <[email protected]>
Cc: David Rowley <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: Olof Salberger <[email protected]>
Cc: [email protected]
Subject: Re: Performance implications of partitioning by UUIDv7 range in PostgreSQL v18
Date: Fri, 24 Oct 2025 08:38:57 -0400
Message-ID: <CAKAnmmKm_-Q0M=6puBCTO6eeSrgu1_Hkh4m5+WJKenorWoH2xg@mail.gmail.com> (raw)
In-Reply-To: <CAE_7N376toqc-RBpER=p4goYvjb57xinEoCGHJ2Y70aDQJwn5w@mail.gmail.com>
References: <CAE_7N37MopcS6SYmsphE7UxQ9bJTyvgsmVb-NyCncy7fzkiC4Q@mail.gmail.com>
	<CAE_7N37Amq_G6bZDpv9tbxcZJNGVhSv8mt2MJgdZTqGO5Pdbnw@mail.gmail.com>
	<CAD39LRHMO7nEKhub=RyeZH=+Qw=qo6gSNuByDLWsR9-EDmGjhg@mail.gmail.com>
	<CAKAnmmJq3_wFNp4RN15t_YRv9xARVby7=-4PrADwPuaQQYC6JA@mail.gmail.com>
	<CAE_7N35fiC7Rq03hWutO3tPGfADQeO_gQzKHru1iNiASmUdsPQ@mail.gmail.com>
	<[email protected]>
	<CAApHDvqcjH9y_ofuBB8XnFA1JPZEcYSLzGss1+i9xPTcmcHLjQ@mail.gmail.com>
	<CAE_7N376toqc-RBpER=p4goYvjb57xinEoCGHJ2Y70aDQJwn5w@mail.gmail.com>

On Thu, Oct 23, 2025 at 10:14 PM Jonathan Reis <[email protected]>
wrote:

> Can't use pg_partman (this is true?)
>

Apologies, this warrants an explanation. It turns out I was wrong to be
concerned. I was worried about pg_partman being able to partition by the
decoded value of a column, but it already handles that quite well. From the
docs (where col3 is of type uuid):

SELECT partman.create_parent(
    p_parent_table := 'partman_test.time_taptest_table'
    , p_control := 'col3'
    , p_interval := '1 day'
    , p_time_encoder := 'partman.uuid7_time_encoder'
    , p_time_decoder := 'partman.uuid7_time_decoder'
);


This also kind of answers your other question about your uuidv7_floor
function. While not native to Postgres, the uuid7_time_encoder function
used above is extremely similar to yours. See
https://github.com/pgpartman/pg_partman/blob/development/sql/functions/util_uuid7_time.sql

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support


view thread (11+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Performance implications of partitioning by UUIDv7 range in PostgreSQL v18
  In-Reply-To: <CAKAnmmKm_-Q0M=6puBCTO6eeSrgu1_Hkh4m5+WJKenorWoH2xg@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox