Sophia Paterakis
asked on
pgpool-II on Ubuntu 14.04... ARGH!
I'm trying to install pgpool-II on Ubuntu, but I keep hitting roadblocks.
1. I started with apt-get, but it installed a woefully old version of pgpool
2. I download the source and built it, now I have 3.4.1 running... all good, except:
3. I can't get the pgpool-regclass to compile or be available for installation into the template1 database. :-/
QUESTION: Where can I get pgpool-II v3.4.1 pre-packaged for Ubuntu 14.04, that includes the necessary pgpool-regclass.sql scripts?
ALTERNATIVE QUESTION: How can I build pgpool-II on Ubuntu 14.04, which also includes the pgpool-regclass.sql scripts?
I've managed to build the "pgpool" binary, but the sql scripts are eluding me. :-/ The error I'm getting is:
The header file does exist, as I've managed to build and install PostgreSQL:
I've added the path to the Makefile, but I'm not sure what's going wrong. :-/
Thanks.
1. I started with apt-get, but it installed a woefully old version of pgpool
2. I download the source and built it, now I have 3.4.1 running... all good, except:
3. I can't get the pgpool-regclass to compile or be available for installation into the template1 database. :-/
QUESTION: Where can I get pgpool-II v3.4.1 pre-packaged for Ubuntu 14.04, that includes the necessary pgpool-regclass.sql scripts?
ALTERNATIVE QUESTION: How can I build pgpool-II on Ubuntu 14.04, which also includes the pgpool-regclass.sql scripts?
I've managed to build the "pgpool" binary, but the sql scripts are eluding me. :-/ The error I'm getting is:
root@pgpool-1:~/pgpool/pgpool-II-3.4.1/src/sql/pgpool-regclass# make
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -I. -I. -I/usr/include/postgresql/server -I/usr/include/postgresql/internal -D_GNU_SOURCE -c -o pgpool-regclass.o pgpool-regclass.c
pgpool-regclass.c:26:22: fatal error: postgres.h: No such file or directory
#include "postgres.h"
^
compilation terminated.
make: *** [pgpool-regclass.o] Error 1
The header file does exist, as I've managed to build and install PostgreSQL:
root@pgpool-1:~# find / -name postgres.h -print
/usr/local/pgsql/include/server/postgres.h
/root/postgres/postgresql-9.3.6/src/include/postgres.h
I've added the path to the Makefile, but I'm not sure what's going wrong. :-/
root@pgpool-1:~/pgpool/pgpool-II-3.4.1/src/sql/pgpool-regclass# cat Makefile
MODULES = pgpool-regclass
DATA_built = pgpool-regclass.sql
DATA = uninstall_pgpool-regclass.sql
EXTENSION = pgpool_regclass
DATA = pgpool_regclass--1.0.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 = ../..
## top_builddir = /root/postgres/postgresql-9.3.6
top_builddir = /root/postgres/postgresql-9.3.6
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS = $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/pgpool-regclass
#top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I ended up building it from source on the pgpool-II servers:
Then I built the regclass stuff on the PostgreSQL database server:
Then I loaded it into the template1 database:
sudo su -
cd
mkdir pgpool
cd pgpool
wget http://www.pgpool.net/download.php?f=pgpool-II-3.4.2.tar.gz -O pgpool-II-3.4.2.tar.gz
gunzip -c pgpool-II-3.4.2.tar.gz | tar xvf -
cd pgpool-II-3.4.2
./configure --with-pam
make clean
make
make install
Then I built the regclass stuff on the PostgreSQL database server:
cd /root/pgpool/pgpool-II-3.4.2/src/sql/pgpool-regclass
cp Makefile Makefile.orig
vi Makefile
diff Makefile Makefile.orig
11c11
< ## USE_PGXS = true
---
> USE_PGXS = true
14c14
< top_builddir = /root/postgres/postgresql-9.3.6
---
> top_builddir = ../..
make
make install
#
cd /root/pgpool/pgpool-II-3.4.1/src/sql/pgpool-recovery
cp Makefile Makefile.orig
vi Makefile
diff Makefile Makefile.orig
11c11
< ## USE_PGXS = true
---
> USE_PGXS = true
14c14
< top_builddir = /root/postgres/postgresql-9.3.6
---
> top_builddir = ../..
make
make install
#
cd /root/pgpool/pgpool-II-3.4.1/src/sql/pgpool_adm
cp Makefile Makefile.orig
vi Makefile
diff Makefile Makefile.orig
11c11
< ## USE_PGXS = true
---
> USE_PGXS = true
14c14
< top_builddir = /root/postgres/postgresql-9.3.6
---
> top_builddir = ../..
make
make install
Then I loaded it into the template1 database:
postgres=# CREATE EXTENSION pgpool_recovery;
CREATE EXTENSION
postgres=# CREATE EXTENSION pgpool_regclass;
CREATE EXTENSION
ASKER
http://lists.pgfoundry.org
But the documentation doesn't mention this at all...
http://www.pgpool.net/docs