Re: Fix locking issue with fixed-size stats template in injection_points - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Fix locking issue with fixed-size stats template in injection_points
Date
Msg-id aNom7L8TLRAZS96D@paquier.xyz
Whole thread Raw
In response to Re: Fix locking issue with fixed-size stats template in injection_points  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Fix locking issue with fixed-size stats template in injection_points
List pgsql-hackers
On Mon, Sep 29, 2025 at 09:46:05AM +0800, Chao Li wrote:
> I saw pg_state_begin_changecount_write() is called multiple places,
> as you mention, for example bgwriter.

I've mentioned that in my first email, and put in details:
- pgstat_report_bgwriter() is called once, by the bgwriter.
- pgstat_report_checkpointer() is called three time, all by the
checkpointer.
- pgstat_report_archiver() is called twice, all by pgarch.c.

So all of them don't have a problem, two calls cannot happen
concurrently.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] Add tests for Bitmapset
Next
From: shveta malik
Date:
Subject: Re: Issue with logical replication slot during switchover