pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Understanding max_locks_per_transaction
Date: Mon, 16 Oct 2023 16:06:44 -0500
Message-ID: <5f7399b5-a3c8-48bb-9b8f-ce7dd63ae8c1@gmail.com> (raw)
In-Reply-To: <CAGqBcTa0gx20RP-7-KZUz-jj-Kc9a1DRSMNHKdx8zeib6pBFKQ@mail.gmail.com>
References: <CAGqBcTY9N_=ChgGMVkfm=2gMMZPOBCViSTmRkvPhRC0jCVg5Gw@mail.gmail.com>
	<2438977.1697481141@sss.pgh.pa.us>
	<CAGqBcTa0gx20RP-7-KZUz-jj-Kc9a1DRSMNHKdx8zeib6pBFKQ@mail.gmail.com>

On 10/16/23 14:31, Craig McIlwee wrote:
> That's what we've already done for the short term solution.  It is 
> somewhat in conflict with your statement regarding the number of lockable 
> objects not holding still for long, though.  As time goes on and our 
> scheduled jobs automatically create new monthly partitions, or as our 
> schema evolves, we may eventually hit the limits again.  That's why we'd 
> like to create some formula that can estimate the 
> max_locks_per_transaction value we should configure (with the previously 
> mentioned multiplier for safety / future proofing).  An alternative would 
> be to precreate all partitions we anticipate needing so we don't get 
> surprises down the line, but then we incur extra planning cost for tables 
> that will stay empty for months or even years.

Just set max_locks_per_transaction to Something Big, and go on to other 
business.  16384 worked for us, after slowly inching up towards 1000. Tom's 
response let me not worry about setting "so big", and we haven't had any 
problems since.

-- 
Born in Arizona, moved to Babylonia.





view thread (4+ messages)

Message-ID: <5f7399b5-a3c8-48bb-9b8f-ce7dd63ae8c1@gmail.com>
Permalink:  ../5f7399b5-a3c8-48bb-9b8f-ce7dd63ae8c1@gmail.com/
Also on:    postgresql.org/message-id/5f7399b5-a3c8-48bb-9b8f-ce7dd63ae8c1@gmail.com

 · 

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 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: ronljohnsonjr@gmail.com
  Subject: Re: Understanding max_locks_per_transaction
  In-Reply-To: <5f7399b5-a3c8-48bb-9b8f-ce7dd63ae8c1@gmail.com>
  References: <CAGqBcTY9N_=ChgGMVkfm=2gMMZPOBCViSTmRkvPhRC0jCVg5Gw@mail.gmail.com> <2438977.1697481141@sss.pgh.pa.us> <CAGqBcTa0gx20RP-7-KZUz-jj-Kc9a1DRSMNHKdx8zeib6pBFKQ@mail.gmail.com> <5f7399b5-a3c8-48bb-9b8f-ce7dd63ae8c1@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox