public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jonathan Reis <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: David Rowley <[email protected]>
Cc: Greg Sabino Mullane <[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:24:46 -0700
Message-ID: <CAE_7N3639q922kKsLWn2KK0qQfeV0ggck9t6S7GQGxaKwpVUWg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
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>
	<[email protected]>

Great point. One of the main reasons we are using partitioning is to
quickly drop partitions containing old data so we wouldn't be implementing
foreign key constraints any way.

On Thu, Oct 23, 2025 at 10:04 PM Laurenz Albe <[email protected]>
wrote:

> On Fri, 2025-10-24 at 11:54 +1300, David Rowley wrote:
> > On Fri, 24 Oct 2025 at 09:38, Laurenz Albe <[email protected]>
> wrote:
> > > I recommend that you create a primary key on each partition rather
> than having one
> > > on the partitioned table.
> >
> > It might be worth mentioning that doing that would forego having the
> > ability to reference the partitioned table in a foreign key
> > constraint.
>
> Right, but referencing a partitioned table with a foreign key is a mixed
> blessing
> anyway: you could no longer drop partitions from the partitioned table
> without
> scanning the referencing table to verify that the foreign key is not
> violated.
>
> Yours,
> Laurenz Albe
>


view thread (11+ messages)

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: <CAE_7N3639q922kKsLWn2KK0qQfeV0ggck9t6S7GQGxaKwpVUWg@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