Re: Postgresql 14 partitioning advice - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Postgresql 14 partitioning advice
Date
Msg-id CAMkU=1zffUC_Yrp2xvsWPAKg5f9A3SjdfopiUcasmjsO6mQoaA@mail.gmail.com
Whole thread Raw
In response to Postgresql 14 partitioning advice  (Rick Otten <rottenwindfish@gmail.com>)
List pgsql-performance
On Wed, Jul 27, 2022 at 8:55 AM Rick Otten <rottenwindfish@gmail.com> wrote:

One person I talked to said "try not to have more than 100 partitions", even with the latest postgresql you'll end up with a lot of lock contention if you go over 100 partitions.


It is hard to know how seriously to take the advice of anonymous people accompanied with such sparse justification.  Meanwhile, people who actually wrote the code seem to think that this problem has been mostly overcome with declarative partitioning in the newer versions.

When you do decide to start removing the oldest data, how will you do it?  Your partitioning should probably be designed to align with this.

Since the data most frequently queried would be recent data (say the past month or so)

Is this done specifically with a time clause, or just by criteria which happen to align with time, but have no formal relationship with it?

Cheers,

Jeff

pgsql-performance by date:

Previous
From: Joe Conway
Date:
Subject: Re: alter table xxx set unlogged take long time
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: alter table xxx set unlogged take long time