On 06/12/14 10:01, CS_DBA wrote:
> 
> We would like to setup a hot standby server with a forced delay.
> Is it possible to setup a hot standby based ONLY on WAL shipping and NOT 
> use streaming replication?

Yes it is.  Though, I assume you mean 'forced max sync period' as
opposed to 'forced delay'.  Transfers will happen as WAL's fill or
the timeout expires.

The slave will also be read-only.

Here's a setup for every 10 mins (600 secs).

On master (postgresql.conf):
   wal_level = hot_standby
   archive_mode = on
   archive_command = '<your_archive_command>'
   archive_timeout = 600        # Or whatever timeout you want

On slave (postgresql.conf):
   hot_standby = on

On slave (recovery.conf):
   standby_mode = 'on'
   restore_command = '<your_restore_command>'
   archive_cleanup_command = '<your_cleanup_command>'

I don't recall if a full re-sync is required prior to changing the
wal_level or whether simply restarting both servers will suffice.

Usual caveats and disclaimers apply. :-)

HTH,
Bosco.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to