Skip to content

Commit a9cb00a

Browse files
author
Amit Kapila
committed
Replace magic constants used in pg_stat_get_replication_slot().
A few variables have been using 10 as a magic constant while PG_STAT_GET_REPLICATION_SLOT_COLS can be used instead. Author: Masahiko Sawada Reviewed-By: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/CAD21AoBvqODDfmD17DkEuPCvV2KbruukXQ2Vwrv5Xi-TsAsTJA@mail.gmail.com
1 parent dfceed3 commit a9cb00a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/pgstatfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,8 +2317,8 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
23172317
text *slotname_text = PG_GETARG_TEXT_P(0);
23182318
NameData slotname;
23192319
TupleDesc tupdesc;
2320-
Datum values[10];
2321-
bool nulls[10];
2320+
Datum values[PG_STAT_GET_REPLICATION_SLOT_COLS];
2321+
bool nulls[PG_STAT_GET_REPLICATION_SLOT_COLS];
23222322
PgStat_StatReplSlotEntry *slotent;
23232323
PgStat_StatReplSlotEntry allzero;
23242324

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