Re: pg_stat_get_replication_slot() marked not strict, crashes
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>,
Amit Kapila <amit.kapila16@gmail.com>
Date: 2022-03-27T06:29:34Z
Lists: pgsql-hackers
Attachments
- 0001-pg_stat_get_replication_slot-NULL-handling_Head.patch (text/x-patch) patch 0001
- 0001-pg_stat_get_replication_slot-NULL-handling_PG14.patch (text/x-patch) patch 0001
On Sun, Mar 27, 2022 at 2:54 AM Andres Freund <andres@anarazel.de> wrote: > > Hi, > > I'm working to increase the test coverage of pgstat related stuff higher (for > the shared memory stats patch, of course). > > "Accidentally" noticed that > SELECT * FROM pg_stat_get_replication_slot(NULL); > crashes. This is present in HEAD and 14. > > I guess we'll have to add a code-level check in 14 to deal with this? This problem is reproducible in both PG14 & Head, changing isstrict solves the problem. In PG14 should we also add a check in pg_stat_get_replication_slot so that it can solve the problem for the existing users who have already installed PG14 or will this be handled automatically when upgrading to the new version. Regards, Vignesh
Commits
-
Mark pg_stat_get_subscription_stats() strict.
- da4b56662f2c 15.0 landed
-
Fix NULL input behaviour of pg_stat_get_replication_slot().
- 43a7dc96eb36 15.0 landed
- c1a0d7d1c4b7 14.3 landed