Merge pull request #1790 from citusdata/add_stub_udf

Add stub UDFs to run pg_upgrade flawlessly
pull/1802/head
Metin Döşlü 2017-11-13 15:30:45 +02:00 committed by GitHub
commit 02ee714c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View File

@ -78,6 +78,9 @@ PG_FUNCTION_INFO_V1(master_get_table_ddl_events);
PG_FUNCTION_INFO_V1(master_get_new_shardid); PG_FUNCTION_INFO_V1(master_get_new_shardid);
PG_FUNCTION_INFO_V1(master_get_new_placementid); PG_FUNCTION_INFO_V1(master_get_new_placementid);
PG_FUNCTION_INFO_V1(master_get_active_worker_nodes); PG_FUNCTION_INFO_V1(master_get_active_worker_nodes);
PG_FUNCTION_INFO_V1(master_get_round_robin_candidate_nodes);
PG_FUNCTION_INFO_V1(master_stage_shard_row);
PG_FUNCTION_INFO_V1(master_stage_shard_placement_row);
/* /*
@ -370,6 +373,45 @@ GetNextPlacementId(void)
} }
/*
* master_get_round_robin_candidate_nodes is a stub UDF to make pg_upgrade
* work flawlessly while upgrading servers from 6.1. This implementation
* will be removed after the UDF dropped on the sql side properly.
*/
Datum
master_get_round_robin_candidate_nodes(PG_FUNCTION_ARGS)
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("this function is deprecated and no longer is used")));
}
/*
* master_stage_shard_row is a stub UDF to make pg_upgrade
* work flawlessly while upgrading servers from 6.1. This implementation
* will be removed after the UDF dropped on the sql side properly.
*/
Datum
master_stage_shard_row(PG_FUNCTION_ARGS)
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("this function is deprecated and no longer is used")));
}
/*
* master_stage_shard_placement_row is a stub UDF to make pg_upgrade
* work flawlessly while upgrading servers from 6.1. This implementation
* will be removed after the UDF dropped on the sql side properly.
*/
Datum
master_stage_shard_placement_row(PG_FUNCTION_ARGS)
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("this function is deprecated and no longer is used")));
}
/* /*
* master_get_active_worker_nodes returns a set of active worker host names and * master_get_active_worker_nodes returns a set of active worker host names and
* port numbers in deterministic order. Currently we assume that all worker * port numbers in deterministic order. Currently we assume that all worker

View File

@ -139,6 +139,9 @@ extern Datum master_get_table_ddl_events(PG_FUNCTION_ARGS);
extern Datum master_get_new_shardid(PG_FUNCTION_ARGS); extern Datum master_get_new_shardid(PG_FUNCTION_ARGS);
extern Datum master_get_new_placementid(PG_FUNCTION_ARGS); extern Datum master_get_new_placementid(PG_FUNCTION_ARGS);
extern Datum master_get_active_worker_nodes(PG_FUNCTION_ARGS); extern Datum master_get_active_worker_nodes(PG_FUNCTION_ARGS);
extern Datum master_get_round_robin_candidate_nodes(PG_FUNCTION_ARGS);
extern Datum master_stage_shard_row(PG_FUNCTION_ARGS);
extern Datum master_stage_shard_placement_row(PG_FUNCTION_ARGS);
/* Function declarations to help with data staging and deletion */ /* Function declarations to help with data staging and deletion */
extern Datum master_create_empty_shard(PG_FUNCTION_ARGS); extern Datum master_create_empty_shard(PG_FUNCTION_ARGS);