diff --git a/src/backend/utils/activity/pgstat_shmem.c b/src/backend/utils/activity/pgstat_shmem.c index 9e4ea2e042..cee0bd6023 100644 --- a/src/backend/utils/activity/pgstat_shmem.c +++ b/src/backend/utils/activity/pgstat_shmem.c @@ -780,7 +780,11 @@ pgstat_drop_entry_internal(PgStatShared_HashEntry *shent, * backends to release their references. */ if (shent->dropped) - elog(ERROR, "can only drop stats once"); + elog(ERROR, + "trying to drop stats entry already dropped: kind=%s dboid=%u objoid=%u refcount=%u", + pgstat_get_kind_info(shent->key.kind)->name, + shent->key.dboid, shent->key.objoid, + pg_atomic_read_u32(&shent->refcount)); shent->dropped = true; /* release refcount marking entry as not dropped */