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

Commit83f415e

Browse files
committed
Add more debugging information when dropping twice pgstats entry
Floris Van Nee has reported a bug in the pgstats facility where a statsentry already dropped would get again dropped. This case should nothappen, still the error generated did not offer any details about thestats entry getting dropped.This commit improves the error message generated to inform about thestats entry kind, database OID, object OID and refcount, which shouldhelp to debug more the problem reported. Bertrand Drouvot has beenindependently able to reach this error path while writing a new feature,and more details about the failure would have been helpful fordebugging.Author: Andres Freund, Bertrand DrouvotDiscussion:https://postgr.es/m/20240505160915.6boysum4f34siqct@awork3.anarazel.deDiscussion:https://postgr.es/m/ZkM30paAD8Cr/Bix@ip-10-97-1-34.eu-west-3.compute.internalBackpatch-through: 15
1 parent8405d5a commit83f415e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,11 @@ pgstat_drop_entry_internal(PgStatShared_HashEntry *shent,
784784
* backends to release their references.
785785
*/
786786
if (shent->dropped)
787-
elog(ERROR,"can only drop stats once");
787+
elog(ERROR,
788+
"trying to drop stats entry already dropped: kind=%s dboid=%u objoid=%u refcount=%u",
789+
pgstat_get_kind_info(shent->key.kind)->name,
790+
shent->key.dboid,shent->key.objoid,
791+
pg_atomic_read_u32(&shent->refcount));
788792
shent->dropped= true;
789793

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp