Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install pgpool-recovery #62

Open
mirecekparecek opened this issue Aug 1, 2024 · 3 comments
Open

Cannot install pgpool-recovery #62

mirecekparecek opened this issue Aug 1, 2024 · 3 comments
Assignees

Comments

@mirecekparecek
Copy link

mirecekparecek commented Aug 1, 2024

Hello,

I was trying to install pgpool-recovery for online recovery. I followed the steps here: https://www.pgpool.net/docs/latest/en/html/example-replication-mode.html. But when I got to 8.3.5.5. Online Recovery I couldn't get it to install the extension.

Here are the errors I got:

# find / -name pgpool-recovery
/usr/src/debug/pgpool-II-pg15-4.2.17-1pgdg.rhel9.x86_64/src/sql/pgpool-recovery
/usr/pgsql-15/lib/bitcode/pgpool-recovery
# find / -name pgpool-recovery.control
# find / -name pgpool_recovery.control
/usr/share/pgsql/extension/pgpool_recovery.control
/usr/pgsql-15/share/extension/pgpool_recovery.control
# find / -name pgpool_recovery

$ psql template1 -c "CREATE EXTENSION pgpool_recovery"
ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
postgres=# CREATE EXTENSION pgpool_recovery;
ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
postgres=# CREATE EXTENSION "pgpool-recovery";
ERROR: extension "pgpool-recovery" is not available
DETAIL: Could not open extension control file "/usr/share/pgsql/extension/pgpool-recovery.control": No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.
# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)

# select * from pg_available_extensions;
name | default_version | installed_version | comment
-----------------+-----------------+-------------------+----------------------------------------------------
plpgsql | 1.0 | 1.0 | PL/pgSQL procedural language
pgpool_recovery | 1.3 | | recovery functions for pgpool-II for V4.1 or later
(2 rows)

$ find / -name pgpool-recovery.sql 2>/dev/null
/usr/pgsql-15/share/extension/pgpool-recovery.sql
$ cd /usr/pgsql-15/share/extension/
$ ls -la
total 72
drwxr-xr-x. 2 root root 4096 Jul 31 14:13 .
drwxr-xr-x. 3 root root 23 Jul 31 14:13 ..
-rw-r--r--. 1 root root 798 May 15 09:23 pgpool_adm--1.0--1.1.sql
-rw-r--r--. 1 root root 2574 May 15 09:23 pgpool_adm--1.0.sql
-rw-r--r--. 1 root root 899 May 15 09:23 pgpool_adm--1.1--1.2.sql
-rw-r--r--. 1 root root 2653 May 15 09:23 pgpool_adm--1.1.sql
-rw-r--r--. 1 root root 5983 May 15 09:23 pgpool_adm--1.2--1.3.sql
-rw-r--r--. 1 root root 2714 May 15 09:23 pgpool_adm--1.2.sql
-rw-r--r--. 1 root root 4222 May 15 09:23 pgpool_adm--1.3.sql
-rw-r--r--. 1 root root 146 May 15 09:23 pgpool_adm.control
-rw-r--r--. 1 root root 429 May 15 09:23 pgpool_recovery--1.1--1.2.sql
-rw-r--r--. 1 root root 980 May 15 09:23 pgpool_recovery--1.1.sql
-rw-r--r--. 1 root root 447 May 15 09:23 pgpool_recovery--1.2--1.3.sql
-rw-r--r--. 1 root root 1221 May 15 09:23 pgpool_recovery--1.2.sql
-rw-r--r--. 1 root root 1486 May 15 09:23 pgpool_recovery--1.3.sql
-rw-r--r--. 1 root root 178 May 15 09:23 pgpool_recovery.control
-rw-r--r--. 1 root root 1311 May 15 09:23 pgpool-recovery.sql
$ psql -f pgpool-recovery.sql template1
psql:pgpool-recovery.sql:9: ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
psql:pgpool-recovery.sql:18: ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
psql:pgpool-recovery.sql:26: ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
psql:pgpool-recovery.sql:33: ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
psql:pgpool-recovery.sql:38: ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
psql:pgpool-recovery.sql:43: ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory
psql:pgpool-recovery.sql:48: ERROR: could not access file "$libdir/pgpool-recovery": No such file or directory

$ sudo find / -name pgpool-recovery.so 2>/dev/null
/usr/local/lib/pgpool-recovery.so
/usr/pgsql-15/lib/pgpool-recovery.so

$ pg_config
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/pgsql
HTMLDIR = /usr/share/doc/pgsql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/pgsql
INCLUDEDIR-SERVER = /usr/include/pgsql/server
LIBDIR = /usr/lib64
PKGLIBDIR = /usr/lib64/pgsql

Im using postgresql 15.6, rhel 9, pgpool-II version 4.2.17 (chichiriboshi) and I installed everything through package manager.

Thank you for your replies

(This is my first time posting issue so sorry if I'm doing it incorrectly.)

@pengbo0328 pengbo0328 self-assigned this Aug 1, 2024
@pengbo0328
Copy link
Collaborator

@mirecekparecek I think you are using the PostgreSQL packages provided by your distribution.
Since the pgpool-II-pg15-extensions package are built for PostgreSQL 15 provided by the PostgreSQL community, which is installed in /usr/pgsql-15, it cannot be used with packages installed in other paths.

To work with your PostgreSQL packages, you need to install the pgpool extensions from source code.

https://www.pgpool.net/docs/latest/en/html/install-pgpool-recovery.html

@mirecekparecek
Copy link
Author

mirecekparecek commented Aug 6, 2024

@pengbo0328
Hello, do I have to install whole pgpool from source or can I have pgpool-II installed from package and then install the extension from src ?

This is what I get trying to install from source
pwd:
/pgpool2/src/sql/pgpool-recovery

make
Makefile:21: /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk'. Stop.

@pengbo0328
Copy link
Collaborator

@mirecekparecek

Hello, do I have to install whole pgpool from source or can I have pgpool-II installed from package and then install the extension from src ?

Yes. I think you just need to install the extension from src.

make
Makefile:21: /usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk'. Stop.

You need to install postgresql-server-devel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants