diff options
author | Tomas Vondra | 2016-08-24 10:40:05 +0000 |
---|---|---|
committer | Pavan Deolasee | 2016-10-18 10:07:46 +0000 |
commit | 0209f28822cdcf0335358b8b9b37dadb005da58a (patch) | |
tree | bee3bca3e14a39511569a00409a367593e25a5c9 | |
parent | abfae4e67af2c4b5f6a0e036e3cd6a9d2fb4c6ec (diff) |
remove stormutils, containing only stormdb_promote_standby() function
Although stormdb_promote_standby() is a function visible from SQL,
it does not seem mentioned anywhere (e.g. in the docs etc.). So
let's get rid of it, as it's apparently not needed.
-rw-r--r-- | src/backend/pgxc/cluster/Makefile | 2 | ||||
-rw-r--r-- | src/backend/pgxc/cluster/stormutils.c | 46 | ||||
-rw-r--r-- | src/include/catalog/pg_proc.h | 4 | ||||
-rw-r--r-- | src/include/utils/builtins.h | 3 |
4 files changed, 1 insertions, 54 deletions
diff --git a/src/backend/pgxc/cluster/Makefile b/src/backend/pgxc/cluster/Makefile index 85c1d493f0..f1283ec3d5 100644 --- a/src/backend/pgxc/cluster/Makefile +++ b/src/backend/pgxc/cluster/Makefile @@ -12,6 +12,6 @@ subdir = src/backend/pgxc/cluster top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global -OBJS = pause.o stormutils.o +OBJS = pause.o include $(top_srcdir)/src/backend/common.mk diff --git a/src/backend/pgxc/cluster/stormutils.c b/src/backend/pgxc/cluster/stormutils.c deleted file mode 100644 index 26b00d4ac5..0000000000 --- a/src/backend/pgxc/cluster/stormutils.c +++ /dev/null @@ -1,46 +0,0 @@ -/*------------------------------------------------------------------------- - * - * stormutils.c - * - * Miscellaneous util functions - * - * IDENTIFICATION - * $$ - * - *------------------------------------------------------------------------- - */ - -#ifdef XCP -#include "postgres.h" -#include "miscadmin.h" - -#include "utils/builtins.h" -#include "../interfaces/libpq/libpq-fe.h" -#include "commands/dbcommands.h" - -/* - * stormdb_promote_standby: - * - * Promote a standby into a regular backend by touching the trigger file. We - * cannot do it from outside via a normal shell script because this function - * needs to be called in context of the operation that is moving the node. - * Providing a function call provides some sense of transactional atomicity - */ -Datum -stormdb_promote_standby(PG_FUNCTION_ARGS) -{ - char trigger_file[MAXPGPATH]; - FILE *fp; - - snprintf(trigger_file, MAXPGPATH, "%s/stormdb.failover", DataDir); - - if ((fp = fopen(trigger_file, "w")) == NULL) - ereport(ERROR, - (errmsg("could not create trigger file"), - errdetail("The trigger file path was: %s", - trigger_file))); - fclose(fp); - - PG_RETURN_VOID(); -} -#endif diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index c618866832..35989af54a 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -5290,10 +5290,6 @@ DATA(insert OID = 7024 ( pgxc_is_inprogress PGNSP PGUID 12 1 1 0 0 f f f f t t DESCR("is given GXID in progress?"); DATA(insert OID = 7011 ( pgxc_lock_for_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pgxc_lock_for_backup _null_ _null_ _null_ )); DESCR("lock the cluster for taking backup"); -#ifdef XCP -DATA(insert OID = 7012 ( stormdb_promote_standby PGNSP PGUID 12 1 0 0 0 f f f f t f v 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ stormdb_promote_standby _null_ _null_ _null_ )); -DESCR("touch trigger file on a standby machine to end replication"); -#endif DATA(insert OID = 7014 ( numeric_agg_state_in PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 7018 "2275" _null_ _null_ _null_ _null_ _null_ numeric_agg_state_in _null_ _null_ _null_ )); DESCR("I/O"); DATA(insert OID = 7015 ( numeric_agg_state_out PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 2275 "7018" _null_ _null_ _null_ _null_ _null_ numeric_agg_state_out _null_ _null_ _null_ )); diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index c7cc57f3be..90c97004df 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -1303,9 +1303,6 @@ extern Datum pg_cursor(PG_FUNCTION_ARGS); extern Datum pgxc_pool_check(PG_FUNCTION_ARGS); extern Datum pgxc_pool_reload(PG_FUNCTION_ARGS); -/* backend/pgxc/cluster/stormutils.c */ -extern Datum stormdb_promote_standby(PG_FUNCTION_ARGS); - /* backend/access/transam/transam.c */ extern Datum pgxc_is_committed(PG_FUNCTION_ARGS); extern Datum pgxc_is_inprogress(PG_FUNCTION_ARGS); |