diff options
author | Amit Kapila <akapila@postgresql.org> | 2021-04-14 08:55:03 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2021-04-14 08:55:03 +0530 |
commit | cca57c1d9bf7eeba5b81115e0b82651cf3d8e4ea (patch) | |
tree | 9eba133a9964982eecc42ac177a8d029953928d7 /src/backend/utils/adt/pgstatfuncs.c | |
parent | 20661c15db8f430d4880ba685e6b12afa271c1ac (diff) | |
download | postgresql-cca57c1d9bf7eeba5b81115e0b82651cf3d8e4ea.tar.gz postgresql-cca57c1d9bf7eeba5b81115e0b82651cf3d8e4ea.zip |
Use NameData datatype for slotname in stats.
This will make it consistent with the other usage of slotname in the code.
In the passing, change pgstat_report_replslot signature to use a structure
rather than multiple parameters.
Reported-by: Andres Freund
Author: Vignesh C
Reviewed-by: Sawada Masahiko, Amit Kapila
Discussion: https://postgr.es/m/20210319185247.ldebgpdaxsowiflw@alap3.anarazel.de
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
-rw-r--r-- | src/backend/utils/adt/pgstatfuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index 182b15e3f23..521ba736143 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -2328,7 +2328,7 @@ pg_stat_get_replication_slots(PG_FUNCTION_ARGS) MemSet(values, 0, sizeof(values)); MemSet(nulls, 0, sizeof(nulls)); - values[0] = PointerGetDatum(cstring_to_text(s->slotname)); + values[0] = CStringGetTextDatum(NameStr(s->slotname)); values[1] = Int64GetDatum(s->spill_txns); values[2] = Int64GetDatum(s->spill_count); values[3] = Int64GetDatum(s->spill_bytes); |