in the case where we have
SERVER1 (prod db) and
SERVER2 (hot standby), what happens to the WAL files from
SERVER2 goes into recovery mode and is opened?
ARCHIVE_COMMAND looks like this
test ! -f SERVER2:$PGDATA/pg_xlogArchive/%f && scp %p SERVER2:$PGDATA/pg_xlogArchive/%f
RESTORE_COMMAND looks like this
cp -f /vol2/postgres92/pgsql/data/pg_xlogArchive/%f /vol2/postgres92/pgsql/data/pg_xlog
all works ok, and when the trigger file is created both
SERVER2 are available for writes. But as the
SERVER1 remains in place I was expecting the WAL files to continue to be shipped to
SERVER2 into the
SERVER2:$PGDATA/pg_xlogArchive/%f location, but they aren't. So how does
SERVER1 know to stop shipping the logs?