pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ashkil Dighin <ashkildighin76@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: LwLockRelease performance
Date: Thu, 02 Dec 2021 17:19:39 -0500
Message-ID: <2225685.1638483579@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH6zzqCqZGqwDBWQqHb=XSVMyRBHBE+bh5sVnrQe-UE0uabwtg@mail.gmail.com>
References: <CAH6zzqCqZGqwDBWQqHb=XSVMyRBHBE+bh5sVnrQe-UE0uabwtg@mail.gmail.com>

Ashkil Dighin <ashkildighin76@gmail.com> writes:
> The performance bottleneck in LWLockRelease()method goes through an array
> one by one to see which lock was released with O(N). As soon as the lock is
> found it performs an array to remove the lock.

Typically, such locks are released in LIFO order.  Do you have any
actual evidence of a performance problem here?

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <2225685.1638483579@sss.pgh.pa.us>
Permalink:  ../2225685.1638483579@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2225685.1638483579@sss.pgh.pa.us

 · 

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: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ashkildighin76@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: LwLockRelease performance
  In-Reply-To: <2225685.1638483579@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