YanChii / ansible-role-postgres-ha

Create postgresql HA auto-failover cluster using pcs, pacemaker and PAF
Apache License 2.0
33 stars 22 forks source link

Postgres 10 synchronize slave databases fails due to bg_basebackup change #19

Closed benmccown closed 5 years ago

benmccown commented 5 years ago

std_err output:

    "/usr/pgsql-10/bin/pg_basebackup: unrecognized option '--xlog-method=stream'",
    "Try \"pg_basebackup --help\" for more information."

For some reason pg_basebackup removed the --xlog-method command switch in Postgres 10.

Note the docs for 9.6: https://www.postgresql.org/docs/9.6/app-pgbasebackup.html

-X method --xlog-method=method

Both options are listed

For Postgres 10 -X method --wal-method=method

The below line leads me to believe xlog was renamed to wal for this utility: "The write-ahead log files are written to a separate file named pg_wal.tar (if the server is a version earlier than 10, the file will be named pg_xlog.tar)."

Changing to -X will be compatible with both old and new versions

So instead of --xlog-method=stream -X stream

benmccown commented 5 years ago

I have have committed a solution to my fork and will create a pull request shortly after some more testing

benmccown commented 5 years ago

Closing this issue as issue 18 is tracking the Postgres 10 compatibility effort.