Re: elog(DEBUG2 in SpinLocked section. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: elog(DEBUG2 in SpinLocked section.
Date
Msg-id 2235395.1591745055@sss.pgh.pa.us
Whole thread Raw
In response to Re: elog(DEBUG2 in SpinLocked section.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: elog(DEBUG2 in SpinLocked section.
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Jun 9, 2020 at 1:59 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> When I went through the existing spinlock stanzas, the only thing that
>> really made me acutely uncomfortable was the chunk in pg_stat_statement's
>> pgss_store(), lines 1386..1438 in HEAD.

> I mean, what would be wrong with having an LWLock per pgss entry?

Hmm, maybe nothing.  I'm accustomed to thinking of them as being
significantly more expensive than spinlocks, but maybe we've narrowed
the gap enough that that's not such a problem.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: global barrier & atomics in signal handlers (Re: Atomicoperations within spinlocks)
Next
From: Andres Freund
Date:
Subject: Re: elog(DEBUG2 in SpinLocked section.