Re: Switching timeline over streaming replication - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Switching timeline over streaming replication
Date
Msg-id 00a801cda6f3$4aba27b0$e02e7710$@kapila@huawei.com
Whole thread Raw
In response to Re: Switching timeline over streaming replication  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Switching timeline over streaming replication  (Amit Kapila <amit.kapila@huawei.com>)
Re: Switching timeline over streaming replication  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On Tuesday, October 09, 2012 10:32 PM Heikki Linnakangas wrote:
> On 06.10.2012 15:58, Amit Kapila wrote:
> > One more test seems to be failed. Apart from this, other tests are
> passed.
> >
It seems there is one more defect, please check the same
Defect: 
       1. start primary A        2. start standby B following A        3. start cascade standby C following B.
4.Promote standby B.        5. After successful time line switch in cascade standby C, stop C.        6. Restart C,
startupis failing with the following error.        FATAL:  requested timeline 2 does not contain minimum recovery
point
0/3000000 on timeline 1 


Review: 
The following statement is present in the hig-availability.sgml file, which
is also needs to be modified in the patch. 

Promoting a cascading standby terminates the immediate downstream
replication connections which it serves. This is because the timeline
becomes different between standbys, and they can no longer continue
replication. The affected standby(s) may reconnect to reestablish streaming
replication.


I felt some of minor comments are still not handled:
35. +SendTimeLineHistory(TimeLineHistoryCmd *cmd)  {  .. + fd = PathNameOpenFile(path, O_RDONLY | PG_BINARY, 0666);
errorhandling for fd < 0 is missing.  
 
36.+SendTimeLineHistory(TimeLineHistoryCmd *cmd)  {  .. if (nread <= 0) 
+                        ereport(ERROR, 
+                                        (errcode_for_file_access(), 
+                                         errmsg("could not read file
\"%s\": %m", 
+                                                        path)));

FileClose should be done in error case as well.


With Regards,
Amit Kapila.




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is there a good reason why PL languages do not support cstring type arguments and return values ?
Next
From: Tom Lane
Date:
Subject: Re: Improving the performance of psql tab completion