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

执行pg_rman backup报错 #250

Closed zgwstar closed 1 year ago

zgwstar commented 1 year ago

pg_rman是1.3.15,postgres是14,报错如下: [postgres@ops-dev-app ~]$ pg_rman backup --backup-mode=full --with-serverlog --progress INFO: copying database files 2023-07-26 09:41:34.393 CST [13577] ERROR: function pg_backup_start(unknown, unknown) does not exist at character 38 2023-07-26 09:41:34.393 CST [13577] HINT: No function matches the given name and argument types. You might need to add explicit type casts. 2023-07-26 09:41:34.393 CST [13577] STATEMENT: SELECT from pg_walfile_name_offset(pg_backup_start($1, $2)) 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))

mikecaat commented 1 year ago

Hi,

I think the reason is that your pg_rman binary is not for PostgreSQL v14 because the pg_backup_start() function is supported only in PostgreSQL v15.

Can you show me the following result?

zgwstar commented 1 year ago

Hi,

I think the reason is that your pg_rman binary is not for PostgreSQL v14 because the pg_backup_start() function is supported only in PostgreSQL v15.

Can you show me the following result?

  • rpm -qa | grep -e postgres -e pg_rman
  • pg_rman -V
  • psql -c "SELECT version();"

[postgres@ops-dev-app ~]$ rpm -qa | grep -e postgres -e pg_rman postgresql-libs-9.2.24-7.el7_9.x86_64 [postgres@ops-dev-app ~]$ [postgres@ops-dev-app ~]$ [postgres@ops-dev-app ~]$ pg_rman -V pg_rman 1.3.15 [postgres@ops-dev-app ~]$ psql -c "SELECT version();" version

PostgreSQL 14.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit (1 row)

thank you. how can solve the problem?

mikecaat commented 1 year ago

Don't you use the rpm packages? How do you install pg_rman? https://github.com/ossc-db/pg_rman/releases/tag/V1.3.15

If you want to build the pg_rman binary from source code, you need checkout the proper branch.

$ cd pg_rman
$ git checkout remotes/origin/REL_14_STABLE
$ make
$ make install
zgwstar commented 1 year ago

Don't you use the rpm packages? How do you install pg_rman? https://github.com/ossc-db/pg_rman/releases/tag/V1.3.15

If you want to build the pg_rman binary from source code, you need checkout the proper branch.

$ cd pg_rman
$ git checkout remotes/origin/REL_14_STABLE
$ make
$ make install

============================================================ my postgresql and pg_rman installed by source code. my server can not connect internet. I can not execute git checkout

mikecaat commented 1 year ago

I see. You can download the source code for v14 https://github.com/ossc-db/pg_rman/releases/download/V1.3.15/pg_rman-1.3.15-pg14.tar.gz

zgwstar commented 1 year ago

pg_rman -V

great.thank you