Re: Feature proposal: immutable/sealed partitions (and maybe tables, too)

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Levi Aul <levi(at)covalenthq(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Feature proposal: immutable/sealed partitions (and maybe tables, too)
Date: 2022-09-07 00:52:42
Message-ID: CAApHDvoWiT-hjedbTuZ5bFtntGSvg7_nw=hARtLbpObKSu9Htg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 7 Sept 2022 at 07:40, Levi Aul <levi(at)covalenthq(dot)com> wrote:
> In other words, our workload is inherently one that acquires "way too many locks." Our largest performance bottleneck, according to pg_wait_sampling, is the LockManager itself. Despite most of our queries spending only milliseconds actually executing, they often spend seconds during planning waiting to acquire hundreds of access-shared locks.

It would be good to have a better understanding of the problem you're
facing. There have been many changes to table partitioning since
PostgreSQL 10 and many of those changes affect the number of
partitions which are locked for certain classes of queries.

It would be good to know the following:

1. Which version of PostgreSQL are you having this problem with, and;
2. Example of queries you're having this problem with.

If you share that information we may be able to inform you about
features/performance improvements in newer versions which help with
the problem you're facing.

You mention "constraint-exclusion", that's no longer how we perform
partition pruning and hasn't been since (if I remember correctly)
PostgreSQL 11. Perhaps you're using PG10?

David

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Levi Aul 2022-09-07 01:33:18 Re: Feature proposal: immutable/sealed partitions (and maybe tables, too)
Previous Message Tom Lane 2022-09-06 21:29:47 Re: [EXT] Re: log_min_messages = warning