summaryrefslogtreecommitdiff
path: root/src/backend/utils/activity/pgstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/activity/pgstat.c')
-rw-r--r--src/backend/utils/activity/pgstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/activity/pgstat.c b/src/backend/utils/activity/pgstat.c
index a428b079c2e..8b57845e870 100644
--- a/src/backend/utils/activity/pgstat.c
+++ b/src/backend/utils/activity/pgstat.c
@@ -1187,7 +1187,7 @@ pgstat_build_snapshot(void)
Assert(!found);
entry->data = MemoryContextAlloc(pgStatLocal.snapshot.context,
- kind_info->shared_size);
+ pgstat_get_entry_len(kind));
/*
* Acquire the LWLock directly instead of using
@@ -1196,7 +1196,7 @@ pgstat_build_snapshot(void)
LWLockAcquire(&stats_data->lock, LW_SHARED);
memcpy(entry->data,
pgstat_get_entry_data(kind, stats_data),
- kind_info->shared_size);
+ pgstat_get_entry_len(kind));
LWLockRelease(&stats_data->lock);
}
dshash_seq_term(&hstat);