Re: Synchronous replication - patch status inquiry - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Synchronous replication - patch status inquiry
Date
Msg-id 4C860FDA.9010408@enterprisedb.com
Whole thread Raw
In response to Re: Synchronous replication - patch status inquiry  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Synchronous replication - patch status inquiry
List pgsql-hackers
On 07/09/10 12:47, Simon Riggs wrote:
> The WAL is sent from master to standby in 8192 byte chunks, frequently
> including multiple commits. From standby, one reply per chunk. If we
> need to wait for apply while nothing else is received, we do.

Ok, thank you. The obvious performance problem is that even if you 
define a transaction to use synchronization level 'recv', and there's no 
other concurrent transactions running, you actually need to wait until 
it's applied. If you have only one client, there is no difference 
between the levels, you always get the same performance hit you get with 
'apply'. With more clients, you get some benefit, but there's still 
plenty of delays compared to the optimum.

Also remember that there can be a very big gap between when a record is 
fsync'd and when it's applied, if the recovery needs to wait for a hot 
standby transaction to finish.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Synchronous replication - patch status inquiry
Next
From: Simon Riggs
Date:
Subject: Re: Synchronous replication - patch status inquiry