public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Guidance on Calculating max_locks_per_transaction for a Highly Partitioned Environment
Date: Tue, 30 Jun 2026 12:47:11 -0400
Message-ID: <CANzqJaAO05XN2PLrf3t1TzvR9Gp4f4nDUCjdOxEWkSkJLy9jaw@mail.gmail.com> (raw)
In-Reply-To: <CAK+uD7g=EE4ypAsuF8L9ZQ3FSuRD-YJ8nOkkyDnSooA_jidycQ@mail.gmail.com>
References: <CAK+uD7g=EE4ypAsuF8L9ZQ3FSuRD-YJ8nOkkyDnSooA_jidycQ@mail.gmail.com>
On Tue, Jun 30, 2026 at 9:26 AM Vivek Gadge <[email protected]> wrote:
> Hello Team,
>
> I am looking for guidance on determining an appropriate value for the
> max_locks_per_transaction parameter in our PostgreSQL 17.6 production
> environment.
>
> Environment has the following characteristics:
>
> PostgreSQL Version: 17.6
> max_connections = 1500
>
That's HIGH. If you have that many concurrent connections, then you really
need a connection pooler.
> Is there a recommended methodology or formula for estimating
> max_locks_per_transaction.
>
> Our objective is to determine an appropriate value based on workload
> characteristics rather than increasing the parameter through trial and
> error.
>
The memory structures handling locks per transaction are really light. I
set the value to 15000 (where average connection count is around 30) and
then worry about something else.
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
view thread (2+ 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]
Subject: Re: Guidance on Calculating max_locks_per_transaction for a Highly Partitioned Environment
In-Reply-To: <CANzqJaAO05XN2PLrf3t1TzvR9Gp4f4nDUCjdOxEWkSkJLy9jaw@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