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

Commitab74ce4

Browse files
committed
Add information about "generation" when dropping twice pgstats entry
Dropping twice a pgstats entry should not happen, and the error reportgenerated was missing the "generation" counter (tracking when an entryis reused) that has been added in818119a.Liked92573a, backpatch down to v15 where this information isuseful to have, to gather more information from instances where theproblem shows up. A report has shown that this error path has beenreached on a standby based on 17.3, for a relation stats entry and anOID close to wraparound.Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/CAN4RuQvYth942J2+FcLmJKgdpq6fE5eqyFvb_PuskxF2eL=Wzg@mail.gmail.comBackpatch-through: 15
1 parenta9ffb35 commitab74ce4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,11 +874,12 @@ pgstat_drop_entry_internal(PgStatShared_HashEntry *shent,
874874
*/
875875
if (shent->dropped)
876876
elog(ERROR,
877-
"trying to drop stats entry already dropped: kind=%s dboid=%u objid=%"PRIu64" refcount=%u",
877+
"trying to drop stats entry already dropped: kind=%s dboid=%u objid=%"PRIu64" refcount=%u generation=%u",
878878
pgstat_get_kind_info(shent->key.kind)->name,
879879
shent->key.dboid,
880880
shent->key.objid,
881-
pg_atomic_read_u32(&shent->refcount));
881+
pg_atomic_read_u32(&shent->refcount),
882+
pg_atomic_read_u32(&shent->generation));
882883
shent->dropped= true;
883884

884885
/* release refcount marking entry as not dropped */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp