mirror of https://github.com/citusdata/citus.git
Implement onurctirtir's suggestions
parent
09ab4bdcb3
commit
7aa3e93852
|
@ -1681,12 +1681,12 @@ citus_is_primary_node(PG_FUNCTION_ARGS)
|
|||
if (workerNode == NULL)
|
||||
{
|
||||
ereport(WARNING, (errmsg("could not find the current node in pg_dist_node"),
|
||||
errdetail("If this is the coordinator node, consider adding it "
|
||||
"into the metadata by using citus_set_coordinator_host() "
|
||||
"UDF. Otherwise, if you're going to use this node as a "
|
||||
"worker node for a new cluster, make sure to add this "
|
||||
"node into the metadata from the coordinator by using "
|
||||
"citus_add_node() UDF."));
|
||||
errdetail("If this is the coordinator node, consider adding it "
|
||||
"into the metadata by using citus_set_coordinator_host() "
|
||||
"UDF. Otherwise, if you're going to use this node as a "
|
||||
"worker node for a new cluster, make sure to add this "
|
||||
"node into the metadata from the coordinator by using "
|
||||
"citus_add_node() UDF.")));
|
||||
PG_RETURN_NULL();
|
||||
}
|
||||
|
||||
|
|
|
@ -55,3 +55,4 @@ DROP VIEW IF EXISTS pg_catalog.citus_lock_waits;
|
|||
#include "udfs/citus_internal_update_relation_colocation/12.2-1.sql"
|
||||
#include "udfs/repl_origin_helper/12.2-1.sql"
|
||||
#include "udfs/citus_finish_pg_upgrade/12.2-1.sql"
|
||||
#include "udfs/citus_is_primary_node/12.2-1.sql"
|
||||
|
|
|
@ -26,6 +26,7 @@ DROP FUNCTION citus_internal.commit_management_command_2pc();
|
|||
ALTER TABLE pg_catalog.pg_dist_transaction DROP COLUMN outer_xid;
|
||||
REVOKE USAGE ON SCHEMA citus_internal FROM PUBLIC;
|
||||
|
||||
DROP FUNCTION pg_catalog.citus_is_primary_node();
|
||||
DROP FUNCTION citus_internal.add_colocation_metadata(int, int, int, regtype, oid);
|
||||
DROP FUNCTION citus_internal.add_object_metadata(text, text[], text[], integer, integer, boolean);
|
||||
DROP FUNCTION citus_internal.add_partition_metadata(regclass, "char", text, integer, "char");
|
||||
|
@ -53,5 +54,5 @@ DROP FUNCTION citus_internal.update_placement_metadata(bigint, integer, integer)
|
|||
DROP FUNCTION citus_internal.update_relation_colocation(oid, int);
|
||||
DROP FUNCTION citus_internal.start_replication_origin_tracking();
|
||||
DROP FUNCTION citus_internal.stop_replication_origin_tracking();
|
||||
DROP FUNCTION citus_internal.is_replication_origin_tracking_active();
|
||||
DROP FUNCTION citus_internal.is_replication_origin_tracking_active();
|
||||
#include "../udfs/citus_finish_pg_upgrade/12.1-1.sql"
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
CREATE FUNCTION pg_catalog.citus_is_primary_node()
|
||||
RETURNS bool
|
||||
LANGUAGE c
|
||||
STRICT
|
||||
AS 'MODULE_PATHNAME', $$citus_is_primary_node$$;
|
||||
COMMENT ON FUNCTION pg_catalog.citus_is_primary_node()
|
||||
IS 'returns whether the current node is the primary node in the group';
|
Loading…
Reference in New Issue