Re: question on streaming replication

From: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: question on streaming replication
Date: 2018-06-14 12:14:00
Message-ID: b902506b-2048-5497-eb70-94663e964e50@portavita.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi Atul,

Please do not cross-post over mailing lists.

As per your problem:

on a streaming replication setup, all changes applied to master are propagated to standby(s).

If standby is stopped or cannot temporary reach master, then it will pick up changes when started or when can reach master again, given that the initial state was in sync with the master.

What stated here above is always true, but there are cases in which too many changes are pushed to master and standby is not able to pick them up.

In order for standby to pick the missing data, is fundamental that the WAL files containing the changes are available to standby or in alternative wal_keep_segments is 'large enough'.

A good starting point to debug the situation are the logfiles of standby server, together with pg_stat_replication table.

Also handy to run on master:

SELECT pg_current_xlog_location() and on standby: select pg_last_xlog_receive_location() to understand if it is picking up. Documentation is always a good starting point to understand what is going on. If you did not already, have a look here: https://www.postgresql.org/docs/9.6/static/runtime-config-replication.html Hope it helps, Fabio

On 14/06/18 07:28, Atul Kumar wrote:
> Hi,
>
> I have postgres edb 9.6 version, i have below query to solve it out.
>
> i have configured streaming replication having master and slave node
> on same server just to test it.
>
> All worked fine but when i made slave service stop, and create some
> test databases in master, after then i made slave service start, slave
> didn't pick the changes.
>
> The replication was on async state.
>
> Then after doing some search on google i tried to make it sync state
> but even making changes in postgresql.conf file I am neither getting
> sync state nor getting any changes on slave server.
>
> Please suggest the needful.
>
>
> Regards,
> Atul
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lawrence Jones 2018-06-14 13:03:30 Re: Impact of multixact "members" limit exceeded
Previous Message Uri Braun 2018-06-14 12:04:32 Append only replication over intermittent links (with local only delete?)

Browse pgsql-hackers by date

  From Date Subject
Next Message Marina Polyakova 2018-06-14 12:16:41 Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors
Previous Message Marina Polyakova 2018-06-14 12:11:13 Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors