Re: Replication slot on master failure

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: hariprasath nallasamy <hariprasathnallasamy(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: Replication slot on master failure
Date: 2016-09-27 02:57:31
Message-ID: CAB7nPqT0FDEL5RMZHPOX7QVYJG2DQ0xea+t84RGf+BOPCJ3bug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 26, 2016 at 7:49 PM, hariprasath nallasamy
<hariprasathnallasamy(at)gmail(dot)com> wrote:
> We are using replication slot for capturing some change sets to
> update dependent tables.
> Will there be inconsistency if the master fails and the standby takes
> the role of master.?

Replication slot creation is not replicated to standbys if that's what
you are looking for. So if you use a slot on master and consume its
data up to a given point, and then promote a standby, you may see a
gap of data after creating a slot, or if you created a slot previously
you may consume twice the same WAL records. Note that replication
slots created on standbys are initialized from the last checkpoint
redo record, so you could take advantage of this property before
promoting a standby.
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick B 2016-09-27 03:22:52 Update two tables returning id from insert CTE Query
Previous Message Michael Paquier 2016-09-27 01:05:59 Re: Large pg_xlog