Open githubzhangwen opened 1 year ago
What is your build command? Did you follow build instructions from the README?
Quote: To compile pg_probackup, you must have a PostgreSQL installation and raw source tree. Execute this in the module's directory:
make USE_PGXS=1 PG_CONFIG=
E.g. you need to build/install postgres first, then you will need two paths:
after that is done - go inside of pg_probackup's directory and run the above make command.
path_to_PostgreSQL_source_tree Where to download the PostgreSQL_source_tree file?
wget https://repo.postgrespro.ru/std-14/keys/pgpro-repo-add.sh sh pgpro-repo-add.sh yum install postgrespro-std-14
[root@pgdb01 data]# ps -ef | grep postgre postgres 14823 21974 0 Apr27 ? 00:00:00 postgres: postgres postgres 192.168.1.178(63647) idle root 20515 19168 0 10:06 pts/0 00:00:00 grep --color=auto postgre postgres 21974 1 0 Apr27 ? 00:00:04 /opt/pgpro/std-14/bin/postgres postgres 21977 21974 0 Apr27 ? 00:00:01 postgres: logger postgres 21979 21974 1 Apr27 ? 00:15:57 postgres: checkpointer postgres 21980 21974 0 Apr27 ? 00:00:31 postgres: background writer postgres 21981 21974 0 Apr27 ? 00:04:55 postgres: walwriter postgres 21982 21974 0 Apr27 ? 00:00:01 postgres: autovacuum launcher postgres 21983 21974 0 Apr27 ? 00:00:18 postgres: archiver failed on 000000010000003E0000002E postgres 21984 21974 0 Apr27 ? 00:00:25 postgres: stats collector postgres 21985 21974 0 Apr27 ? 00:00:00 postgres: logical replication launcher [root@pgdb01 data]# make USE_PGXS=1 PG_CONFIG=/pgdata/postgresql/data/postgresql.conf top_srcdir=/opt/pgpro/std-14/bin make: *** No targets specified and no makefile found. Stop. [root@pgdb01 data]#
[root@dbtest pg_probackup-2.5.12]# make USE_PGXS=1 PG_CONFIG=/pg14/postgresql/data/postgresql.conf top_srcdir=/soft/postgresql-14.7 /pg14/postgresql/data/postgresql.conf: line 65: max_connections: command not found /pg14/postgresql/data/postgresql.conf: line 127: shared_buffers: command not found /pg14/postgresql/data/postgresql.conf: line 150: dynamic_shared_memory_type: command not found /pg14/postgresql/data/postgresql.conf: line 240: max_wal_size: command not found /pg14/postgresql/data/postgresql.conf: line 241: min_wal_size: command not found /pg14/postgresql/data/postgresql.conf: line 580: log_timezone: command not found /pg14/postgresql/data/postgresql.conf: line 694: datestyle: command not found /pg14/postgresql/data/postgresql.conf: line 696: timezone: command not found /pg14/postgresql/data/postgresql.conf: line 710: lc_messages: command not found /pg14/postgresql/data/postgresql.conf: line 712: lc_monetary: command not found /pg14/postgresql/data/postgresql.conf: line 713: lc_numeric: command not found /pg14/postgresql/data/postgresql.conf: line 714: lc_time: command not found /pg14/postgresql/data/postgresql.conf: line 717: default_text_search_config: command not found cc -DFRONTEND -I -Isrc -I/soft/postgresql-14.7//src -c -o src/utils/configuration.o src/utils/configuration.c src/utils/configuration.c:11:26: fatal error: pg_probackup.h: No such file or directory
^
compilation terminated. make: *** [src/utils/configuration.o] Error 1
[root@pgdb01 pg_probackup-2.5.12]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.6 (Maipo) [root@pgdb01 pg_probackup-2.5.12]# git clone https://github.com/postgrespro/pg_probackup contrib/pg_probackup && cd contrib/pg_probackup && make Cloning into 'contrib/pg_probackup'... remote: Enumerating objects: 26850, done. remote: Counting objects: 100% (1795/1795), done. remote: Compressing objects: 100% (471/471), done. remote: Total 26850 (delta 1351), reused 1722 (delta 1319), pack-reused 25055 Receiving objects: 100% (26850/26850), 9.84 MiB | 2.21 MiB/s, done. Resolving deltas: 100% (20716/20716), done. Makefile:48: ../../src/Makefile.global: No such file or directory Makefile:49: ../../contrib/contrib-global.mk: No such file or directory make: *** No rule to make target `../../contrib/contrib-global.mk'. Stop.