Skip to content

Commit 5a6f9bc

Browse files
committed
Mark inet_server_addr() and inet_server_port() as parallel-restricted.
These need to be PR because they access the MyProcPort data structure, which doesn't get copied to parallel workers. The very similar functions inet_client_addr() and inet_client_port() are already marked PR, but somebody missed these. Although this is a pre-existing bug, we can't readily fix it in the back branches since we can't force initdb. Given the small usage of these two functions, and the even smaller likelihood that they'd get pushed to a parallel worker anyway, it doesn't seem worth the trouble to suggest that DBAs should fix it manually. Masahiko Sawada Discussion: https://postgr.es/m/CAD21AoAT4aHP0Uxq91qpD7NL009tnUYQe-b14R3MnSVOjtE71g@mail.gmail.com
1 parent 8b411b8 commit 5a6f9bc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/include/catalog/catversion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 202012293
56+
#define CATALOG_VERSION_NO 202101131
5757

5858
#endif

src/include/catalog/pg_proc.dat

+4-2
Original file line numberDiff line numberDiff line change
@@ -4082,10 +4082,12 @@
40824082
prosrc => 'inet_client_port' },
40834083
{ oid => '2198', descr => 'inet address of the server',
40844084
proname => 'inet_server_addr', proisstrict => 'f', provolatile => 's',
4085-
prorettype => 'inet', proargtypes => '', prosrc => 'inet_server_addr' },
4085+
proparallel => 'r', prorettype => 'inet', proargtypes => '',
4086+
prosrc => 'inet_server_addr' },
40864087
{ oid => '2199', descr => 'server\'s port number for this connection',
40874088
proname => 'inet_server_port', proisstrict => 'f', provolatile => 's',
4088-
prorettype => 'int4', proargtypes => '', prosrc => 'inet_server_port' },
4089+
proparallel => 'r', prorettype => 'int4', proargtypes => '',
4090+
prosrc => 'inet_server_port' },
40894091

40904092
{ oid => '2627',
40914093
proname => 'inetnot', prorettype => 'inet', proargtypes => 'inet',

0 commit comments

Comments
 (0)