Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1webcQ-004tin-1e for pgsql-general@arkaria.postgresql.org; Tue, 30 Jun 2026 16:47:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1webcP-009Duo-0Y for pgsql-general@arkaria.postgresql.org; Tue, 30 Jun 2026 16:47:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1webcO-009Dug-27 for pgsql-general@lists.postgresql.org; Tue, 30 Jun 2026 16:47:28 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1webcM-00000001320-0TNE for pgsql-general@postgresql.org; Tue, 30 Jun 2026 16:47:28 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7e9f1f24cbcso702597a34.0 for ; Tue, 30 Jun 2026 09:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782838044; cv=none; d=google.com; s=arc-20260327; b=HVE+WvlQySFF6oGxPdH1T9BNAngMT4NjS3uT4oghXhIaZMkotdLywGz0MQqsiaXZEr txTV9PP/P1iGM/w0i8Z+gF79zg1ypyL8dksAL6w8Tps02GK+GHI4hFhDDnMsUcZtz3nv kNOfz9M/m0kUuNwieeIWWz2zF9R8l9Ci1SyaPWOoxdTjwUtGhluLSgImMJ1VavhLCzTC BNuj6HGX+gqFgu+cqIFS7I0hbvNwI6a1eHCFtMPK88si3uCuX2tcCgV0pGlZISty/nHb NE4HnayIncdmIyb6sze5FlO3cBwV++0kDWdBKyHu4pLWi0zrlWWIEOOD8mHciAOzZlZ5 ZHwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0T+ToiE5h4gqf/MnvwzBv9CwcD0Uuf98bNhSX0dwbvk=; fh=KNSq+t9BltSXFnT3Yof/aKGBtqxeA+bTALiYdvTslaY=; b=Lo7n3MGVvTT8SEHwIrsCLOIV5h53kPxILREsrKSQQjnnUd3Ol5NAJhd8ezwf9ib6en K6oVuteA6u/Tz2OM2tbmT+EllaU+WZlz3U5nmh3PNJy3vDjApB1A2NJmrPt88g/GEdb9 Y8wNz7Guj0yeIWva1su+ZuNxbS8kBRZ4E3LrY2RTojp61s4GDF8WpVr6Wz/uf/sda7Ek 7x+dZNCpciaQmA2g3feG2jfeq/feBMUfiHrqPzZeRpDCKoBQIk8DT2BtNvTPVE5rp14Q X5OAkztXmdliBpHYuLNhtEv6e34vtS/+NtA/7YJGfLm1KSsvvCAlVM27YDMoPVupKwaT 5W+w==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782838044; x=1783442844; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=0T+ToiE5h4gqf/MnvwzBv9CwcD0Uuf98bNhSX0dwbvk=; b=L1Pto8VEwmeWEqLnyJMeMhWMXOVPM/CAlS0p9BsWqB6rZPwP4ic6N2TwDI2TG4Q6hk S/84hYsDhWsnDyPRP81FIiNWk8L/hexRDJPCWdk7BbkRLHy6OJ+PO/uLbWjQDgbq9vOH APlSeMZEfmmVeZM1hUuJXXuq3+8r4jQ2tfkWl7bZ0U1LVrXGI5Hj5+MMozrP4z/Unc+z QjeUR7+lvH+7W0GqMCIhJyCnOEsA3eh9bcgjAPSKOM560pQ2HlYv0GmfVkuhu2xFIthQ OWWb1JcQIFOt53Mb9x1AMbQAmSIw5jLddIIPqDSXSMJIzTJ8yHXzuGroOiY8ZfkW9NOC 0J4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782838044; x=1783442844; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0T+ToiE5h4gqf/MnvwzBv9CwcD0Uuf98bNhSX0dwbvk=; b=QQ73nk4IW8fObVcUZYP8NmZ7MRzXGeh64OsMBi/Mu1V6Mwh2Su2n9ug7W39c0rzX9Q cjIEBcNeQa04DkyGDw1luWaALuelTPuyospqcCcq80VkTlT+AQiQr1qeaqj1ZMaBnu05 Nn7vq99Z4VlrsdcB0ixIxDxAOAYn0LM8jESVbFL2ucT+MjWlLg7pyy1KMrUYJPbKKhVI ELPpc+9YHk6mdCkKsQRlvDvhKcCeopMyfRGso9YlgG6jK0+c0FpaGmxY6MNnY8NdIyAp QPMhRXHsOXBNDUjMNnBfB5WXrctYcvdLQEyU0IjS2Bb28SDZ5AuGkHno0Fxy7by3yB5Q zo7Q== X-Gm-Message-State: AOJu0YxWRo43fEmEbTVMh7hN1kREdz6N7Dhjkyo2pm9m4AUZmBS9ZnXW Y28coNNZCPj+snueCPjbo3aZosWn9Tywx3N9OKVbsRZltjsi40+SlL9jQJYIwY1/OyDGIYV8ssN m2z6XFOdUbLeThhFbQqQKqC1pqgZySlV0Wg== X-Gm-Gg: AfdE7cke84QN0RAAasGeKydh10xkUZ3+scKQXmxyJaB9yMrrme3c3ZoqjTKvStBB3bR oFWWJttsIHe7H0rLrhXMoGgIruYegAySBnfWeU/8eT4jsaQ9zYocGT4YGoYMYVVrK+V2SEcqi45 65msrWPertu2VZ4YPZfCMU4kht4TO+L98QI1chhQA3+TQS++Q46KsnOL1yEyMF0LToNiypmcRAQ p0CumDy+4TuCHDrNmtNbYSyDQsmgJC3LkQfx42uVm5RXmMpgj6a8GyiQ6NmSWxquPfr0OHr2g== X-Received: by 2002:a05:6830:1d63:b0:7e9:e9f3:266c with SMTP id 46e09a7af769-7e9f5f28f4cmr1116520a34.14.1782838043903; Tue, 30 Jun 2026 09:47:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Tue, 30 Jun 2026 12:47:11 -0400 X-Gm-Features: AVVi8CcPb1_xUK6e-J-QGq5BB_yvpK6UcY5Y7YQPrlRlqrMlJvFDA6gdOpQXXvU Message-ID: Subject: Re: Guidance on Calculating max_locks_per_transaction for a Highly Partitioned Environment To: pgsql-general Content-Type: multipart/alternative; boundary="0000000000004c8be106557b54d8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000004c8be106557b54d8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 30, 2026 at 9:26=E2=80=AFAM Vivek Gadge = 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 =3D 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. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000004c8be106557b54d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Jun 30, 2026 at 9:26=E2=80=AFAM Vivek Gadge <vvkgadge56@gmail.com> wrote:
Hello Team,

I am looking for guidance on determining an appropria= te value for the max_locks_per_transaction parameter in our PostgreSQL 17.6= production environment.

Environment has the following characteristics:

=
=C2=A0 =C2=A0 PostgreSQL Version: 17.6
=C2=A0 =C2=A0 max_connections =3D 1500
<= div>
That's HIGH.=C2=A0 If you have that many concurrent = connections, then you really need a connection pooler.
=C2=A0
=C2=A0 =C2= =A0 Is there a recommended methodology or formula for estimating max_locks_= per_transaction.

Our obj= ective is to determine an appropriate value based on workload characteristi= cs rather than increasing the parameter through trial and error.
=C2=A0
The memory structures handling lo= cks per transaction are really light.=C2=A0 I set the value to 15000 (where= average connection count is around 30) and then worry about something else= .

--
=
Death to <Re= dacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
--0000000000004c8be106557b54d8--