diff options
Diffstat (limited to 'src/include/utils/pgstat_internal.h')
-rw-r--r-- | src/include/utils/pgstat_internal.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h index 4bb8e5c53ab..8914aaca9ab 100644 --- a/src/include/utils/pgstat_internal.h +++ b/src/include/utils/pgstat_internal.h @@ -156,8 +156,8 @@ typedef struct PgStat_EntryRef * Pending statistics data that will need to be flushed to shared memory * stats eventually. Each stats kind utilizing pending data defines what * format its pending data has and needs to provide a - * PgStat_KindInfo->flush_pending_cb callback to merge pending into shared - * stats. + * PgStat_KindInfo->flush_pending_cb callback to merge pending entries + * into the shared stats hash table. */ void *pending; dlist_node pending_node; /* membership in pgStatPending list */ @@ -260,7 +260,8 @@ typedef struct PgStat_KindInfo /* * For variable-numbered stats: flush pending stats. Required if pending - * data is used. See flush_fixed_cb for fixed-numbered stats. + * data is used. See flush_static_cb when dealing with stats data that + * that cannot use PgStat_EntryRef->pending. */ bool (*flush_pending_cb) (PgStat_EntryRef *sr, bool nowait); @@ -289,17 +290,23 @@ typedef struct PgStat_KindInfo void (*init_shmem_cb) (void *stats); /* - * For fixed-numbered statistics: Flush pending stats. Returns true if - * some of the stats could not be flushed, due to lock contention for - * example. Optional. + * For fixed-numbered or variable-numbered statistics: Flush pending stats + * entries, for stats kinds that do not use PgStat_EntryRef->pending. + * + * Returns true if some of the stats could not be flushed, due to lock + * contention for example. Optional. */ - bool (*flush_fixed_cb) (bool nowait); + bool (*flush_static_cb) (bool nowait); /* - * For fixed-numbered statistics: Check for pending stats in need of - * flush. Returns true if there are any stats pending for flush. Optional. + * For fixed-numbered or variable-numbered statistics: Check for pending + * stats in need of flush with flush_static_cb, when these do not use + * PgStat_EntryRef->pending. + * + * Returns true if there are any stats pending for flush, triggering + * flush_static_cb. Optional. */ - bool (*have_fixed_pending_cb) (void); + bool (*have_static_pending_cb) (void); /* * For fixed-numbered statistics: Reset All. |