Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81ae9e6

Browse files
committed
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 aswell...Per buildfarm animal rorqual
1 parent3536b85 commit81ae9e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/activity/pgstat_shmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ pgstat_reinit_entry(PgStat_Kind kind, PgStatShared_HashEntry *shhashent)
292292

293293
/* reinitialize content */
294294
Assert(shheader->magic==0xdeadbeef);
295-
memset(shheader,0,pgstat_get_kind_info(shhashent->key.kind)->shared_size);
296-
shheader->magic=0xdeadbeef;
295+
memset(pgstat_get_entry_data(kind,shheader),0,
296+
pgstat_get_entry_len(kind));
297297

298298
returnshheader;
299299
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp