Re: A micro-optimisation for ProcSendSignal()

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A micro-optimisation for ProcSendSignal()
Date: 2021-06-03 02:38:07
Message-ID: CA+hUKGKppRrnvSsbxfzAU7beXO7jVFm-7Rij1_UgPm9cS3FEXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 12, 2021 at 12:31 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> ProcSendSignal(pid) searches the ProcArray for the given pid and then
> sets that backend's procLatch. It has only two users: UnpinBuffer()
> and ReleasePredicateLocks(). In both cases, we could just as easily
> have recorded the pgprocno instead, avoiding the locking and the
> searching. We'd also be able to drop some special book-keeping for
> the startup process, whose pid can't be found via the ProcArray.

Rebased.

Attachment Content-Type Size
v2-0001-Optimize-ProcSendSignal.patch text/x-patch 9.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-06-03 02:39:20 Re: PoC/WIP: Extended statistics on expressions (\d in old client)
Previous Message Justin Pryzby 2021-06-03 02:36:19 Re: What to call an executor node which lazily caches tuples in a hash table? (GUC)