Skip to content

Commit b19db55

Browse files
committed
Remove PgStat_KindInfo.named_on_disk
This field is used to track if a stats kind can use a custom format representation on disk when reading or writing its stats case. On HEAD, this exists for replication slots stats, that need a mapping between an internal index ID and the slot names. named_on_disk is currently used nowhere and the callbacks to_serialized_name and from_serialized_name are in charge of checking if the serialization of the stats data should apply, so let's remove it. Reviewed-by: Andres Freund Discussion: https://postgr.es/m/ZmKVlSX_T5YvIOsd@paquier.xyz
1 parent 1029bde commit b19db55

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/backend/utils/activity/pgstat.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ static const PgStat_KindInfo pgstat_kind_infos[PGSTAT_NUM_KINDS] = {
307307
.fixed_amount = false,
308308

309309
.accessed_across_databases = true,
310-
.named_on_disk = true,
311310

312311
.shared_size = sizeof(PgStatShared_ReplSlot),
313312
.shared_data_off = offsetof(PgStatShared_ReplSlot, stats),

src/include/utils/pgstat_internal.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,6 @@ typedef struct PgStat_KindInfo
193193
*/
194194
bool accessed_across_databases:1;
195195

196-
/*
197-
* For variable-numbered stats: Identified on-disk using a name, rather
198-
* than PgStat_HashKey. Probably only needed for replication slot stats.
199-
*/
200-
bool named_on_disk:1;
201-
202196
/*
203197
* The size of an entry in the shared stats hash table (pointed to by
204198
* PgStatShared_HashEntry->body).
@@ -239,7 +233,7 @@ typedef struct PgStat_KindInfo
239233
void (*reset_timestamp_cb) (PgStatShared_Common *header, TimestampTz ts);
240234

241235
/*
242-
* For variable-numbered stats with named_on_disk. Optional.
236+
* For variable-numbered stats. Optional.
243237
*/
244238
void (*to_serialized_name) (const PgStat_HashKey *key,
245239
const PgStatShared_Common *header, NameData *name);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy