Re: Report distinct wait events when waiting for WAL "operation" - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Report distinct wait events when waiting for WAL "operation"
Date
Msg-id ZLjDjZU176W7Ezje@paquier.xyz
Whole thread Raw
In response to Re: Report distinct wait events when waiting for WAL "operation"  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Wed, Jul 19, 2023 at 06:49:57PM +0530, Amit Kapila wrote:
> On Mon, Jul 17, 2023 at 10:26 PM Andres Freund <andres@anarazel.de> wrote:
>> FWIW, the former is bottlenecked by the number of WAL insertion locks, the
>> second is bottlenecked by copying WAL into buffers due to needing to flush
>> them.
>
> This gives a better idea of what's going on. +1 for separating these waits.

+ * As this is not used to wait for lwlocks themselves, the caller has to
+ * provide a wait event to be reported.
  */
 bool
-LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval)
+LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval,
+                uint32 wait_event_info)

Makes sense to me to do this split, nice!  And this gives more
flexibility for out-of-core callers, while on it.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Do we want to enable foreign key constraints on subscriber?
Next
From: Bharath Rupireddy
Date:
Subject: Re: Report distinct wait events when waiting for WAL "operation"