Search Postgresql Archives

Re: Synchronous replication and read consistency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Chris/Joshua
> 
> I would like to know more details.
> 
> As per this:
> 
> http://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION
> 
> "When requesting synchronous replication, each commit of a write
> transaction will wait until confirmation is received that the commit
> has been written to the transaction log on disk of both the primary
> and standby server."
> 


Ah, sorry I misread sync replication as streaming replication...


> Does it mean that, on the standby, when PG writes the transaction log
> on the disk, it also updates the data buffers to make the transaction
> visible for all sessions.
> 
> Eg:
> 
>   On the primary
>      A big transaction committed
>   Now if I issue a select on the primary looking for the transaction I
> committed above, I will get what I want.
> Will I get the same result if instead of primary I issue the select on
> the standby.
> 
> Hope it is clear.


Synchronous replication is slower by nature. It will slow down the
master as well because each commit has to wait for a standby to ack it.

The answer to your question is still yes, you will get the same result
on the standby.

You will actually see less lag than with normal streaming replication
in the sense that the standby lagging several transactions behind due to
a commit/write burst on the master is not possible anymore. This
is of course at the expense of master-performance.


Bye,
Chris.






-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux