Closed fourmicao closed 1 year ago
I compared AG2.12.0 release sourcecode with current master branch, and found the reason:
In current master branch, pg_proc.dat defined: { oid => '7007', descr => 'get label ID of graphid',
proname => 'graphid_labid', prorettype => 'int4', proargtypes => 'graphid', prosrc => 'graphid_labid' }
I did a test, just for POC and not a formal workaround, not for production :) Step 1: fix pg_proc argtype definition: postgres=# update pg_catalog.pg_proc set proargtypes=oidvectorin('7002'),prorettype=oidin('23') where proname = 'graphid_labid'; UPDATE 1
3
(1 row) The result is ok now.
Step3:call function graphid_labid(integer) to check if connection will be killed after bug workaround. postgres=# select graphid_labid(3); ERROR: function graphid_labid(integer) does not exist LINE 1: select graphid_labid(3); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
The result sound ok, and connection is alive.
Btw, I found many differences in pg_proc.dat between two versions. Due to lack of c programming skills, I will wait for next release, hopefully not too long to wait:).
Thanks for your reporting.
The task is complete and will be included in the next release. and, If want, you can test with a 2.12 branch.
In AG 2.5.0 graphid_labid is defined like: CREATE OR REPLACE FUNCTION pg_catalog.graphid_labid( graphid) RETURNS integer LANGUAGE 'internal' COST 1 IMMUTABLE STRICT PARALLEL SAFE AS $BODY$ graphid_labid $BODY$; --according to pgadmin4 create script.
While in AG 2.12.0 graphid_labid is defined like: CREATE OR REPLACE FUNCTION pg_catalog.graphid_labid( integer) RETURNS bytea LANGUAGE 'internal' COST 1 IMMUTABLE STRICT PARALLEL SAFE AS $BODY$ graphid_labid $BODY$; --according to pgadmin4 create script.
When I execute function, will generate two type errors: