Re: Fix locking issue with fixed-size stats template in injection_points

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix locking issue with fixed-size stats template in injection_points
Date: 2025-09-29 06:27:56
Message-ID: aNom7L8TLRAZS96D@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2025-09-29 06:28:33 Re: Issue with logical replication slot during switchover
Previous Message Michael Paquier 2025-09-29 06:20:18 Re: [PATCH] Add tests for Bitmapset