On Sat, May 22, 2021 at 8:33 PM Robert Haas <robertmh...@gmail.com> wrote:
> > For my original case, both standby1 and standby2 are connected to the > > primary. Now, standby1 is promoted and standby2 is shut down. And, > > before restarting, all the local WAL of the standby2 is removed so > > that it can follow the new primary. The primary info and restore > > command for standby2 are changed as per the new primary(standby1). > > One thing I don't understand is why the final WAL segment from the > original primary didn't end up in the archive in this scenario. If it > had, then we would not have seen the issue in that case. I used different archive folders for primary and new primary(standby1). I have modified your test.sh slightly (modified test2.sh attached) so that I can demonstrate my scenario where I was seeing the issue and this is getting fixed after putting the fix we discussed[1] [1] - expectedTLEs = readTimeLineHistory(receiveTLI); + expectedTLEs = readTimeLineHistory(recoveryTargetTLI); -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
test2.sh
Description: application/shellscript