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
This commit is contained in:
parent
3536b851ad
commit
81ae9e6588
@ -292,8 +292,8 @@ pgstat_reinit_entry(PgStat_Kind kind, PgStatShared_HashEntry *shhashent)
|
|||||||
|
|
||||||
/* reinitialize content */
|
/* reinitialize content */
|
||||||
Assert(shheader->magic == 0xdeadbeef);
|
Assert(shheader->magic == 0xdeadbeef);
|
||||||
memset(shheader, 0, pgstat_get_kind_info(shhashent->key.kind)->shared_size);
|
memset(pgstat_get_entry_data(kind, shheader), 0,
|
||||||
shheader->magic = 0xdeadbeef;
|
pgstat_get_entry_len(kind));
|
||||||
|
|
||||||
return shheader;
|
return shheader;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user