Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit43a7dc9

Browse files
committed
Fix NULL input behaviour of pg_stat_get_replication_slot().
pg_stat_get_replication_slot() accidentally was marked as non-strict, crashingwhen called with NULL input. As it's already released, introduce an explicitNULL check in 14, fix the catalog in HEAD.Bumps catversion in HEAD.Discussion:https://postgr.es/m/20220326212432.s5n2maw6kugnpyxw@alap3.anarazel.deBackpatch: 14-, where replication slot stats were introduced
1 parent8af3642 commit43a7dc9

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO202203241
56+
#defineCATALOG_VERSION_NO202203271
5757

5858
#endif

‎src/include/catalog/pg_proc.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5370,7 +5370,7 @@
53705370
proargnames => '{pid,status,receive_start_lsn,receive_start_tli,written_lsn,flushed_lsn,received_tli,last_msg_send_time,last_msg_receipt_time,latest_end_lsn,latest_end_time,slot_name,sender_host,sender_port,conninfo}',
53715371
prosrc => 'pg_stat_get_wal_receiver' },
53725372
{ oid => '6169', descr => 'statistics: information about replication slot',
5373-
proname => 'pg_stat_get_replication_slot',proisstrict => 'f',provolatile => 's',
5373+
proname => 'pg_stat_get_replication_slot', provolatile => 's',
53745374
proparallel => 'r', prorettype => 'record', proargtypes => 'text',
53755375
proallargtypes => '{text,text,int8,int8,int8,int8,int8,int8,int8,int8,timestamptz}',
53765376
proargmodes => '{i,o,o,o,o,o,o,o,o,o,o}',

‎src/test/regress/expected/stats.out

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,11 @@ SELECT pg_stat_get_tuples_hot_updated('brin_hot'::regclass::oid);
255255

256256
DROP TABLE brin_hot;
257257
DROP FUNCTION wait_for_hot_stats();
258+
-- ensure that stats accessors handle NULL input correctly
259+
SELECT pg_stat_get_replication_slot(NULL);
260+
pg_stat_get_replication_slot
261+
------------------------------
262+
263+
(1 row)
264+
258265
-- End of Stats Test

‎src/test/regress/sql/stats.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,8 @@ DROP TABLE brin_hot;
229229
DROPFUNCTION wait_for_hot_stats();
230230

231231

232+
-- ensure that stats accessors handle NULL input correctly
233+
SELECT pg_stat_get_replication_slot(NULL);
234+
235+
232236
-- End of Stats Test

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp