[pgpool-general: 352] Re: sync replication postgresql

Guillaume Lelarge guillaume at lelarge.info
Mon Apr 9 16:23:33 JST 2012


On Mon, 2012-04-09 at 11:06 +0400, Евгений Селявка wrote:
> Dear users, I have two servers in sync mode, one master and second is slave:
>  application_name |  client_addr  | client_port |   state   | sync_priority
> | sync_state
> 
> ----+-------------+-----------+---------------+------------------------------+-----------
>  slave2           | 192.168.56.22 |       51055 | streaming |             1
> | sync
> 
> But in pgpool i see this:
> 
> 2012-04-09 10:37:28 LOG:   pid 23867: Replication of node:1 is behind 1976
> bytes from the primary server (node:0)
> 2012-04-09 10:38:19 LOG:   pid 23867: Replication of node:1 is behind 2392
> bytes from the primary server (node:0)
> 
> Why it is possible if in sync mode postgresql master wait until wal logs
> write to slave?
> 

There is a difference between written and replayed. Sync mode in
PostgreSQL means you're sure all the data from your transaction are
available on the synchronous slave, not that they will be readable at
once. And pgpool checks the replayed value. So, even in sync mode,
pgpool may tell you there is a difference between master and slave.
Nothing to be worried about with so small amount of differences.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



More information about the pgpool-general mailing list