Re: HOT standby with ONLY WAL shipping? - Mailing list pgsql-general

From Bosco Rama
Subject Re: HOT standby with ONLY WAL shipping?
Date
Msg-id 5399E165.6090806@boscorama.com
Whole thread Raw
In response to HOT standby with ONLY WAL shipping?  (CS_DBA <cs_dba@consistentstate.com>)
List pgsql-general
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.


pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: pg_dump enhancement ?
Next
From: Torsten Förtsch
Date:
Subject: updates not causing changes