mirror of https://github.com/citusdata/citus.git
add invalidate_inactive_shared_connections udf
parent
10cd79a957
commit
bb7c976b7b
|
@ -109,6 +109,19 @@ static uint32 SharedConnectionHashHash(const void *key, Size keysize);
|
||||||
|
|
||||||
|
|
||||||
PG_FUNCTION_INFO_V1(citus_remote_connection_stats);
|
PG_FUNCTION_INFO_V1(citus_remote_connection_stats);
|
||||||
|
PG_FUNCTION_INFO_V1(invalidate_inactive_shared_connections);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* invalidate_inactive_shared_connections invalidates inactive
|
||||||
|
* and not used shared connections by removing from the global hash.
|
||||||
|
*/
|
||||||
|
Datum
|
||||||
|
invalidate_inactive_shared_connections(PG_FUNCTION_ARGS)
|
||||||
|
{
|
||||||
|
RemoveInactiveNodesFromSharedConnections();
|
||||||
|
PG_RETURN_VOID();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* citus_remote_connection_stats returns all the avaliable information about all
|
* citus_remote_connection_stats returns all the avaliable information about all
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "udfs/worker_create_or_alter_role/9.3-2.sql"
|
#include "udfs/worker_create_or_alter_role/9.3-2.sql"
|
||||||
#include "udfs/truncate_local_data_after_distributing_table/9.3-2.sql"
|
#include "udfs/truncate_local_data_after_distributing_table/9.3-2.sql"
|
||||||
|
|
||||||
|
#include "udfs/invalidate_inactive_shared_connections/9.3-2.sql"
|
||||||
-- add citus extension owner as a distributed object, if not already in there
|
-- add citus extension owner as a distributed object, if not already in there
|
||||||
INSERT INTO citus.pg_dist_object SELECT
|
INSERT INTO citus.pg_dist_object SELECT
|
||||||
(SELECT oid FROM pg_class WHERE relname = 'pg_authid') AS oid,
|
(SELECT oid FROM pg_class WHERE relname = 'pg_authid') AS oid,
|
||||||
|
|
10
src/backend/distributed/sql/udfs/invalidate_inactive_shared_connections/9.3-2.sql
generated
Normal file
10
src/backend/distributed/sql/udfs/invalidate_inactive_shared_connections/9.3-2.sql
generated
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.invalidate_inactive_shared_connections()
|
||||||
|
RETURNS VOID
|
||||||
|
LANGUAGE C STRICT
|
||||||
|
AS 'MODULE_PATHNAME', $$invalidate_inactive_shared_connections$$;
|
||||||
|
|
||||||
|
COMMENT ON FUNCTION pg_catalog.invalidate_inactive_shared_connections()
|
||||||
|
IS 'invalidated inactive shared connections';
|
||||||
|
|
||||||
|
REVOKE ALL ON FUNCTION pg_catalog.invalidate_inactive_shared_connections()
|
||||||
|
FROM PUBLIC;
|
|
@ -0,0 +1,10 @@
|
||||||
|
CREATE OR REPLACE FUNCTION pg_catalog.invalidate_inactive_shared_connections()
|
||||||
|
RETURNS VOID
|
||||||
|
LANGUAGE C STRICT
|
||||||
|
AS 'MODULE_PATHNAME', $$invalidate_inactive_shared_connections$$;
|
||||||
|
|
||||||
|
COMMENT ON FUNCTION pg_catalog.invalidate_inactive_shared_connections()
|
||||||
|
IS 'invalidated inactive shared connections';
|
||||||
|
|
||||||
|
REVOKE ALL ON FUNCTION pg_catalog.invalidate_inactive_shared_connections()
|
||||||
|
FROM PUBLIC;
|
Loading…
Reference in New Issue