ossc-db / pg_rman

Backup and restore management tool for PostgreSQL
http://ossc-db.github.io/pg_rman/index.html
Other
476 stars 77 forks source link

Issue when I try to compile pg_rman from source code #251

Open TeodorChakalov opened 1 year ago

TeodorChakalov commented 1 year ago

Hello, When I try to compile pg_rman I did the following steps:

  1. make
  2. make install

Everything finished successfully but create only pg_rman utility in bin folder (NOT create pg_rman.so in lib folder)

I add pg_stat_statements = 'pg_rman' in postgresql.conf, but when I try to start the server receive this error: [remote]=:[APP]=:[user]=[db]=:58P01:651c243b.19201a::3:0FATAL: 58P01: could not access file "pg_rman": No such file or directory

OpenSSL version: OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.0.7 1 Nov 2022)

OS version: NAME="Rocky Linux" VERSION="9.2 (Blue Onyx)"

Postgresql version: v14.4

mikecaat commented 1 year ago

Yes, you don't need to add 'pg_rman' in postgresql.conf because it's just client program. You can see examples here.

TeodorChakalov commented 1 year ago

Done. Now I receive one new error: [pdbbo_adm@rocky-9 backup]$ pg_rman backup --backup-mode=full --with-serverlog --progress INFO: copying database files ERROR: query failed: ERROR: function pg_backup_start(unknown, unknown) does not exist LINE 1: SELECT from pg_walfile_name_offset(pg_backup_start($1, $2)... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. query was: SELECT from pg_walfile_name_offset(pg_backup_start($1, $2))

Could you please suggest what exactly is the problem ?

mikecaat commented 1 year ago

I think the reason is that function name of PostgreSQL was changed. You need to compile with the branch REL_14_STABLE corresponding your PostgreSQL version.

By the way, it's easier to use the rpm package(pg_rman-1.3.15-1.pg14.rhel9.x86_64.rpm).