pgsql: Fix NULL input behaviour of pg_stat_get_replication_slot(). - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Fix NULL input behaviour of pg_stat_get_replication_slot().
Date
Msg-id E1nYhNa-001hq4-Ow@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix NULL input behaviour of pg_stat_get_replication_slot().

pg_stat_get_replication_slot() accidentally was marked as non-strict, crashing
when called with NULL input. As it's already released, introduce an explicit
NULL check in 14, fix the catalog in HEAD.

Bumps catversion in HEAD.

Discussion: https://postgr.es/m/20220326212432.s5n2maw6kugnpyxw@alap3.anarazel.de
Backpatch: 14-, where replication slot stats were introduced

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c1a0d7d1c4b77d978fe93edc0889589148cbad23

Modified Files
--------------
src/backend/utils/adt/pgstatfuncs.c | 11 ++++++++++-
src/test/regress/expected/stats.out |  7 +++++++
src/test/regress/sql/stats.sql      |  6 ++++++
3 files changed, 23 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: pgsql: Fix pg_waldump docs.
Next
From: Andres Freund
Date:
Subject: pgsql: Don't fail for > 1 walsenders in 019_replslot_limit, add debug m