pgpool2.git / summary / log / commit / refs
commit 2440615d5d97f113b4f965f32842e0a866cebede
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Mon Apr 08 11:14:57 2013 +0000
Remove unnecessary code files.
Makefile.am | 5 --
Makefile.in | 5 --
main.c | 23 ----------
sql/Makefile | 5 +-
sql/pgpool-walrecrunning/Makefile | 21 ---------
sql/pgpool-walrecrunning/README | 3 --
sql/pgpool-walrecrunning/pgpool-walrecrunning.c | 53 ----------------------
.../pgpool-walrecrunning.sql.in | 4 --
.../uninstall_pgpool-walrecrunning.sql | 1 -
9 files changed, 2 insertions(+), 118 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 617fd1dc4..1cb2acf35 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -84,11 +84,6 @@ EXTRA_DIST = pgpool.8.in sample/pgpool.pam \
sql/pgpool-regclass/pgpool_regclass--1.0.sql \
sql/pgpool-regclass/pgpool_regclass.control \
sql/pgpool-regclass/Makefile \
- sql/pgpool-walrecrunning/README \
- sql/pgpool-walrecrunning/pgpool-walrecrunning.c \
- sql/pgpool-walrecrunning/pgpool-walrecrunning.sql.in \
- sql/pgpool-walrecrunning/uninstall_pgpool-walrecrunning.sql \
- sql/pgpool-walrecrunning/Makefile \
pgpool_adm/Makefile pgpool_adm/TODO pgpool_adm/pgpool_adm--1.0.sql \
pgpool_adm/pgpool_adm.c pgpool_adm/pgpool_adm.control \
pgpool_adm/pgpool_adm.h pgpool_adm/pgpool_adm.sql.in \
diff --git a/Makefile.in b/Makefile.in
index 7975ce303..b05b61306 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -382,11 +382,6 @@ EXTRA_DIST = pgpool.8.in sample/pgpool.pam \
sql/pgpool-regclass/pgpool_regclass--1.0.sql \
sql/pgpool-regclass/pgpool_regclass.control \
sql/pgpool-regclass/Makefile \
- sql/pgpool-walrecrunning/README \
- sql/pgpool-walrecrunning/pgpool-walrecrunning.c \
- sql/pgpool-walrecrunning/pgpool-walrecrunning.sql.in \
- sql/pgpool-walrecrunning/uninstall_pgpool-walrecrunning.sql \
- sql/pgpool-walrecrunning/Makefile \
pgpool_adm/Makefile pgpool_adm/TODO pgpool_adm/pgpool_adm--1.0.sql \
pgpool_adm/pgpool_adm.c pgpool_adm/pgpool_adm.control \
pgpool_adm/pgpool_adm.h pgpool_adm/pgpool_adm.sql.in \
diff --git a/main.c b/main.c
index 33e7b1d41..463f06a49 100644
--- a/main.c
+++ b/main.c
@@ -2732,29 +2732,6 @@ static int find_primary_node(void)
return -1;
}
con = s->con;
-#ifdef NOT_USED
- status = do_query(con, "SELECT count(*) FROM pg_catalog.pg_proc AS p WHERE p.proname = 'pgpool_walrecrunning'",
- &res, PROTO_MAJOR_V3);
- if (res->numrows <= 0)
- {
- pool_log("find_primary_node: do_query returns no rows");
- }
- if (res->data[0] == NULL)
- {
- pool_log("find_primary_node: do_query returns no data");
- }
- if (res->nullflags[0] == -1)
- {
- pool_log("find_primary_node: do_query returns NULL");
- }
- if (res->data[0] && !strcmp(res->data[0], "0"))
- {
- pool_log("find_primary_node: pgpool_walrecrunning does not exist");
- free_select_result(res);
- discard_persistent_db_connection(s);
- return -1;
- }
-#endif
status = do_query(con, "SELECT pg_is_in_recovery()",
&res, PROTO_MAJOR_V3);
if (res->numrows <= 0)
diff --git a/sql/Makefile b/sql/Makefile
index 4ab125a0a..00ded9910 100644
--- a/sql/Makefile
+++ b/sql/Makefile
@@ -3,7 +3,7 @@
# pgpool: a language independent connection pool server for PostgreSQL
# written by Tatsuo Ishii
#
-# Copyright (c) 2003-2011 PgPool Global Development Group
+# Copyright (c) 2003-2013 PgPool Global Development Group
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
@@ -39,7 +39,6 @@ endif
SUBDIRS = \
pgpool-recovery \
- pgpool-regclass \
- pgpool-walrecrunning
+ pgpool-regclass
$(recurse)
diff --git a/sql/pgpool-walrecrunning/Makefile b/sql/pgpool-walrecrunning/Makefile
deleted file mode 100644
index 48fa4c20b..000000000
--- a/sql/pgpool-walrecrunning/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-MODULES = pgpool-walrecrunning
-DATA_built = pgpool-walrecrunning.sql
-DATA = uninstall_pgpool-walrecrunning.sql
-
-# if you are using PostgreSQL 8.0 or later,
-# using pg_config is recommended.
-# if you are not, comment out following line and...
-USE_PGXS = true
-# set top_builddir to the PostgreSQL build source tree top.
-# (for example /usr/local/src/postgresql-8.4)
-top_builddir = ../..
-
-ifdef USE_PGXS
-PGXS = $(shell pg_config --pgxs)
-include $(PGXS)
-else
-subdir = contrib/pgpool-walrecrunning
-#top_builddir = ../..
-include $(top_builddir)/src/Makefile.global
-include $(top_srcdir)/contrib/contrib-global.mk
-endif
diff --git a/sql/pgpool-walrecrunning/README b/sql/pgpool-walrecrunning/README
deleted file mode 100644
index 7671bcf13..000000000
--- a/sql/pgpool-walrecrunning/README
+++ /dev/null
@@ -1,3 +0,0 @@
-If you are planning to use the streaming replication mode, you need to
-install this function. Please note that This function needs to be
-installed in "postgres" database.
diff --git a/sql/pgpool-walrecrunning/pgpool-walrecrunning.c b/sql/pgpool-walrecrunning/pgpool-walrecrunning.c
deleted file mode 100644
index e4f7be75e..000000000
--- a/sql/pgpool-walrecrunning/pgpool-walrecrunning.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*-pgsql-c-*- */
-/*
- * $Header$
- *
- * Copyright (c) 2003-2011 PgPool Global Development Group
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission
- * notice appear in supporting documentation, and that the name of the
- * author not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. The author makes no representations about the
- * suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * pgpool-walrecrunning checks the walreceiver state to it's running.
- * pgpool needs to know if the backend is running as a standby by
- * using pg_is_in_recover(). Problem is, it returns true even if
- * walreceiver is going to shutdown. This function checks the internal
- * variable of walreciver to know if it is going to shutdown.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include "postgres.h"
-#include "utils/builtins.h"
-#include "utils/elog.h"
-#include "fmgr.h"
-#include "funcapi.h"
-#include "replication/walreceiver.h"
-#include <stdlib.h>
-
-#ifdef PG_MODULE_MAGIC
-PG_MODULE_MAGIC;
-#endif
-
-PG_FUNCTION_INFO_V1(pgpool_walrecrunning);
-extern Datum pgpool_walrecrunning(PG_FUNCTION_ARGS);
-
-Datum
-pgpool_walrecrunning(PG_FUNCTION_ARGS)
-{
- /* use volatile pointer to prevent code rearrangement */
- volatile WalRcvData *walrcv = WalRcv;
-
- if (walrcv->walRcvState == WALRCV_RUNNING)
- PG_RETURN_BOOL(true);
-
- PG_RETURN_BOOL(false);
-}
diff --git a/sql/pgpool-walrecrunning/pgpool-walrecrunning.sql.in b/sql/pgpool-walrecrunning/pgpool-walrecrunning.sql.in
deleted file mode 100644
index 32f58de37..000000000
--- a/sql/pgpool-walrecrunning/pgpool-walrecrunning.sql.in
+++ /dev/null
@@ -1,4 +0,0 @@
-CREATE OR REPLACE FUNCTION pgpool_walrecrunning()
-RETURNS bool
-AS 'MODULE_PATHNAME', 'pgpool_walrecrunning'
-LANGUAGE C VOLATILE STRICT;
diff --git a/sql/pgpool-walrecrunning/uninstall_pgpool-walrecrunning.sql b/sql/pgpool-walrecrunning/uninstall_pgpool-walrecrunning.sql
deleted file mode 100644
index 81ce25943..000000000
--- a/sql/pgpool-walrecrunning/uninstall_pgpool-walrecrunning.sql
+++ /dev/null
@@ -1 +0,0 @@
-DROP FUNCTION pgpool_walrecrunning();
[parent: 7442dc8a7cbd]