From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Practical maximum max_locks_per_transaction?
Date: Fri, 25 Nov 2022 18:56:17 -0500
Message-ID: <25925.1669420577@sss.pgh.pa.us> (raw)
In-Reply-To: <fa76c81e-723f-01ab-9155-927c549c79ec@gmail.com>
References: <fa76c81e-723f-01ab-9155-927c549c79ec@gmail.com>
Ron <ronljohnsonjr@gmail.com> writes:
> How "raised" is too raised? I just had to increase
> max_locks_per_transaction from 640 to 1024 on an instance with many child
> tables and against which is run many large reports. Another instance has
> zero children, but had to increase the value to 1280 to prevent reports from
> failing.
max_locks_per_transaction in isolation means nothing. What counts
is the product max_locks_per_transaction * max_connections, which is
(more or less) the number of slots allocated in the shared lock table.
Having said that, you can probably make it as big as you want
on any reasonably modern machine. I wouldn't blink at a few
million locktable entries, at least not on 64-bit hardware.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
Subject: Re: Practical maximum max_locks_per_transaction?
In-Reply-To: <25925.1669420577@sss.pgh.pa.us>
References: <fa76c81e-723f-01ab-9155-927c549c79ec@gmail.com> <25925.1669420577@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox