Re: Sync Rep: First Thoughts on Code - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Sync Rep: First Thoughts on Code
Date
Msg-id 4940C4CF.7070600@enterprisedb.com
Whole thread Raw
In response to Re: Sync Rep: First Thoughts on Code  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Sync Rep: First Thoughts on Code  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
> When the WAL starts streaming the *primary* can immediately perform
> synchronous replication, i.e. commit waits for transfer. 

Until the standby has obtained all the missing log files, it's not 
up-to-date, and there's no guarantee that it can finish the replay. For 
example, imagine that your archive_command is an scp from the primary to 
the standby. If a lightning strikes the primary before some WAL file has 
been copied over to the archive directory in the standby, the standby 
can't catch up. In the primary then, what's the point for a commit to 
wait for transfer, if the reply from the standby doesn't guarantee that 
the transaction is safe in the standby?

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


pgsql-hackers by date:

Previous
From: "Rushabh Lathia"
Date:
Subject: Re: Function with default value not replacing old definition of the function
Next
From: "Alif Isophoqote"
Date:
Subject: Debug crash