public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Andres Freund <[email protected]>
Cc: Bertrand Drouvot <[email protected]>
Cc: [email protected]
Subject: Re: per backend WAL statistics
Date: Fri, 17 Jan 2025 08:43:57 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <aj5vdgpbux5e2dbr6gcgd4eu3krjrflljt2neivh2vbkfrlant@2qedfymz7lmh>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<xibh465r3x7xvpzaozu47fxule3dktvwz4yacce4pjlw76lkjd@fjvm56zbev37>
<Z4k9rb3aTNVSmyq/@ip-10-97-1-34.eu-west-3.compute.internal>
<aj5vdgpbux5e2dbr6gcgd4eu3krjrflljt2neivh2vbkfrlant@2qedfymz7lmh>
On Thu, Jan 16, 2025 at 12:44:20PM -0500, Andres Freund wrote:
> On 2025-01-16 17:11:09 +0000, Bertrand Drouvot wrote:
>> So, do you think that the initial proposal that has been made here (See R1. in
>> [2]) i.e make use of a new PendingBackendWalStats variable:
>
> Well, I think this first needs be fixed for for the IO stats change made in
>
> Once we have a pattern to model after, we can apply the same scheme here.
Okay, thanks for the input. I was not sure what you intended
originally with all this part of the backend code, and how much would
be acceptable. The line is clear now.
>> 0003 does not rely on pgstat_prep_backend_pending() for its pending statistics
>> but on a new PendingBackendWalStats variable. The reason is that the pending wal
>> statistics are incremented in a critical section (see XLogWrite(), and so
>> a call to pgstat_prep_pending_entry() could trigger a failed assertion:
>> MemoryContextAllocZero()->"CritSectionCount == 0 || (context)->allowInCritSection"
>> "
>>
>> and implemented up to v4 is a viable approach?
>
> Yes-ish. I think it would be better to make it slightly more general than
> that, handling this for all types of backend stats, not just for WAL.
Agreed to use the same concept for all these parts of the backend
stats kind rather than two of them. Will send a reply on the original
backend I/O thread as well.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (20+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: per backend WAL statistics
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox