* Scott Whitney (scott@xxxxxxxxxxx) wrote: > 1)Add to pg_hba.conf on master: > host replication postgres my IP/32 trust Never use 'trust'. At least use 'md5', all that requires is putting a password into your replication config. > 2) Configure in postgresql.conf on master: > wal_level = hot_standby > max_wal_senders = 5 > wal_keep_segments = SOME NUMBER I HAVE TO DETERMINE BASED ON HOW LONG THE BACKUP ETC TAKES. > > # Maybe do this if the above is not high enough > #archive_mode = on > #archive_command = 'cp %p /path_to/archive/%f' You should definitely have a mechanism for the WALs to be transferred to the replica(s) on a regular basis. Don't just rely on the replication connection. With this, you don't have to worry as much about the wal_keep_segments option above... > 3) Add to postgresql.conf on standby: > hot_standby = on > > 4) Create a recovery.conf on the standby (in $PGDATA): > standby_mode = 'on' > primary_conninfo = 'host=master IP port=5432 user=postgres' In primary_conninfo is where you'd put the password for md5 auth. > 5)Do my backup from the STANDBY AT THE DATA CETNER I think the typical approach is to use the same copy of the master that you did for the intial slave when doing the cascaded slave.. Regardless, and with all of this, test, test, test. Thanks, Stephen
Attachment:
signature.asc
Description: Digital signature