Re: A micro-optimisation for ProcSendSignal()

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-06-03T02:38:07Z
Lists: pgsql-hackers

Attachments

On Fri, Mar 12, 2021 at 12:31 AM Thomas Munro <thomas.munro@gmail.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.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Change ProcSendSignal() to take pgprocno.