pgsql: pgstat: prevent fix pgstat_reinit_entry() from zeroing out lwloc

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pgstat: prevent fix pgstat_reinit_entry() from zeroing out lwloc
Date: 2022-04-07 06:39:53
Message-ID: E1ncLo9-000hD6-1N@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pgstat: prevent fix pgstat_reinit_entry() from zeroing out lwlock.

Zeroing out an lwlock in a normal build turns out to not trigger any alarms,
if nobody can use the lwlock at that moment (as the case here). But with
--disable-spinlocks --disable-atomics, the sema field needs to be initialized.

We probably should make sure that this fails on more common configurations as
well...

Per buildfarm animal rorqual

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/81ae9e65887476b4c55aaad276a8010a459a41ce

Modified Files
--------------
src/backend/utils/activity/pgstat_shmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message John Naylor 2022-04-07 07:01:14 Re: pgsql: pgstat: add pg_stat_force_next_flush(), use it to simplify tests
Previous Message Andres Freund 2022-04-07 06:35:27 Re: pgsql: pgstat: store statistics in shared memory.