On Thu, May 25, 2017 at 5:23 AM, y39chen <yan-jack.chen@xxxxxxxxx> wrote: > My doubt is Standby is redoing the records in WAL from master. how accept > connection in standby side while recovering would trigger > btree_xlog_delete_get_latestRemovedXid() and panic happen. You should look at the relationship between the code of postmaster.c dealing with updates of pmState and how the startup process (xlog.c) lets the postmaster know when it can accept incoming connections. Once a set of conditions is met, the startup process will let the postmaster know if it is safe to accept connections on a hot standby. That's a good study and the code is well-commented, so I let you guess what are those conditions and how they are met during recovery. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general