Re: HOT standby with ONLY WAL shipping?

From: Bosco Rama <postgres(at)boscorama(dot)com>
To: CS_DBA <cs_dba(at)consistentstate(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: HOT standby with ONLY WAL shipping?
Date: 2014-06-12 17:20:37
Message-ID: 5399E165.6090806@boscorama.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Torsten Förtsch 2014-06-12 17:22:57 updates not causing changes
Previous Message Karsten Hilbert 2014-06-12 17:13:29 pg_dump enhancement ?