0

PostgreSQL 9.6, configured backup server via barman tool. Using WAL streaming (pg_receivexlog) and streaming backup (pg_basebackup).

All working good. However for development/debugging purposes I may need to create simple dump and copy it to localhost to inspect.

On master server I can simply use pg_dump tool. But I don't want to use it under heavy production load. So I was thinking - is there a way to create dump from our backup server?

Only one way I can think about: apply barman recover command to different server (not production), then there create simple dump via pg_dump. That will work, but isn't there a way to ditch intermediate server?

1
  • You can use pg_dump on the standby provided it is configured as a "hot standby"
    – user1822
    Commented Dec 18, 2019 at 10:12

1 Answer 1

0

No, you can only run pg_dump against a running PostgreSQL server.

You can avoid the necessity to recover the database whenever you need a pg_dump by setting up a streaming replication hot standby server with max_standby_streaming_delay = -1 and run your pg_dump against that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.