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

Commitfed10d4

Browse files
committed
Properly mark pg_stat_get_subscription() as returning a set.
The initial catalog data for this function failed to set proretsetor provide a prorows estimate. It accidentally worked anyway wheninvoked in the FROM clause, because the executor isn't too pickyabout this; but the planner didn't expect the function to returnmultiple rows, which could lead to bad plans. Also the functionwould fail if invoked in the SELECT list.We can't easily back-patch this fix, but fortunately the bug'sconsequences aren't awful in most cases. Getting this right ismainly an exercise in future-proofing.Discussion:https://postgr.es/m/1636062.1615141782@sss.pgh.pa.us
1 parent5c06abb commitfed10d4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
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_NO202103061
56+
#defineCATALOG_VERSION_NO202103081
5757

5858
#endif

‎src/include/catalog/pg_proc.dat‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5287,8 +5287,9 @@
52875287
proargnames => '{slot_name,spill_txns,spill_count,spill_bytes,stream_txns,stream_count,stream_bytes,stats_reset}',
52885288
prosrc => 'pg_stat_get_replication_slots' },
52895289
{ oid => '6118', descr => 'statistics: information about subscription',
5290-
proname => 'pg_stat_get_subscription', proisstrict => 'f', provolatile => 's',
5291-
proparallel => 'r', prorettype => 'record', proargtypes => 'oid',
5290+
proname => 'pg_stat_get_subscription', prorows => '10', proisstrict => 'f',
5291+
proretset => 't', provolatile => 's', proparallel => 'r',
5292+
prorettype => 'record', proargtypes => 'oid',
52925293
proallargtypes => '{oid,oid,oid,int4,pg_lsn,timestamptz,timestamptz,pg_lsn,timestamptz}',
52935294
proargmodes => '{i,o,o,o,o,o,o,o,o}',
52945295
proargnames => '{subid,subid,relid,pid,received_lsn,last_msg_send_time,last_msg_receipt_time,latest_end_lsn,latest_end_time}',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp