Re: Performance implications of partitioning by UUIDv7 range in PostgreSQL v18 - Mailing list pgsql-performance

From Greg Sabino Mullane
Subject Re: Performance implications of partitioning by UUIDv7 range in PostgreSQL v18
Date
Msg-id CAKAnmmKm_-Q0M=6puBCTO6eeSrgu1_Hkh4m5+WJKenorWoH2xg@mail.gmail.com
Whole thread Raw
In response to Re: Performance implications of partitioning by UUIDv7 range in PostgreSQL v18  (Jonathan Reis <jon.reis@conevity.com>)
List pgsql-performance
On Thu, Oct 23, 2025 at 10:14 PM Jonathan Reis <jon.reis@conevity.com> 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 

Cheers,
Greg

--
Enterprise Postgres Software Products & Tech Support

pgsql-performance by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Performance implications of partitioning by UUIDv7 range in PostgreSQL v18
Next
From: Jonathan Reis
Date:
Subject: Re: Performance implications of partitioning by UUIDv7 range in PostgreSQL v18