Skip to main content
2 of 3
retag
András Váczi
  • 31.6k
  • 13
  • 101
  • 149

Postgres: Can the archive command for master and standby point to the same directory?

I use streaming replication and PITR (WAL files) in my cluster, currently I have different versions of postgresql.conf for the master and the standby server.

The only difference in the files is the archive command, that points to a different directory.

for example, on master I have:

archive_command = 'cp %p /dbckp/server1master/%f'

And on the standby:

archive_command = 'cp %p /dbckp/server2master/%f'

I figure that if the standby is not generating any archives while on 'standby mode' I could use the same directory and have a single postgresql.conf?