Re: Transaction apply speed on the standby

From: Venkata B Nagothi <nag1010(at)gmail(dot)com>
To: Rakesh Kumar <rakeshkumar464(at)outlook(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transaction apply speed on the standby
Date: 2017-01-27 10:26:51
Message-ID: CAEyp7J_5Rpi=zqnU7JFS7jA=nfKkmZzznSkrFPwDDeFQQ6auSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 27, 2017 at 3:34 AM, Rakesh Kumar <rakeshkumar464(at)outlook(dot)com>
wrote:

> Ver 9.6.1
>
> In a streaming replication can it be assumed that if both primary and
> standby are of the same hardware, then the rate at which transactions are
> applied on the standby will be same as that on primary. Or standbys are
> always slower than primary in applying transactions because of the way
> replication works.
>
> The reason why I am asking is that I am trying to find what are the
> circumstances when there can be a large gap between primary and standby in
> async replication mode.
>

As already said, the replication sync between master and standby depends on
lot of factors CPUs, Disks, Network bandwidth etc.

If it is the application demand that data has to be in complete sync on
Standby at all times, then, the best way to go is with synchronous
replication. In this mode PostgreSQL ensures all the changes on master are
replicated to standby and master waits until changes are committed on
standby. This is even more better in 9.6 with "remote_apply" to
synchronous_commit parameter, which ensures data from master is actually
replayed at synchronous standby. However, this type of replication mode can
be a risk when there is a failure (Example : Network break down) and
standby is not connected to master and during this time transactions on
master wait until standby responds back.

Regards,

Venkata B N
Database Consultant

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Venkata B Nagothi 2017-01-27 10:32:34 Re: Question slow query
Previous Message Adrian Klaver 2017-01-27 05:17:35 Re: Postgres ODBC on Windows 10