Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDrdI-0001Pl-SH for pgsql-general@arkaria.postgresql.org; Thu, 25 May 2017 12:12:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dDrdI-0002wH-3r for pgsql-general@arkaria.postgresql.org; Thu, 25 May 2017 12:12:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dDozE-0006xk-D9 for pgsql-general@postgresql.org; Thu, 25 May 2017 09:23:16 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDoz9-0004Ln-MW for pgsql-general@postgresql.org; Thu, 25 May 2017 09:23:15 +0000 Received: from mben.nabble.com (unknown [162.253.133.72]) by mwork.nabble.com (Postfix) with ESMTP id 646D4447C4545 for ; Thu, 25 May 2017 02:23:09 -0700 (MST) Date: Thu, 25 May 2017 02:23:09 -0700 (MST) From: y39chen To: pgsql-general@postgresql.org Message-ID: <1495704189413-5963181.post@n3.nabble.com> In-Reply-To: References: <1495609157661-5963011.post@n3.nabble.com> <2253.1495639128@sss.pgh.pa.us> <2353.1495640833@sss.pgh.pa.us> Subject: Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.2 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Thank you the comments. We found the panic happened when adding one of our patch. static int ProcessStartupPacket(Port *port, bool SSLdone) { ...... /* * If we're going to reject the connection due to database state, say so * now instead of wasting cycles on an authentication exchange. (This also * allows a pg_ping utility to be written.) */ switch (port->canAcceptConnections) { case CAC_STARTUP: ereport(*LOG*, (errcode(ERRCODE_CANNOT_CONNECT_NOW), errmsg("the database system is starting up"))); break; ...... } I understand the patch would accept connection while Postgres master is still recovering. and it is dangerous in general. When I remove the patch(be PANIC still). no panic happened. It seems have relationship. I also noticed there is one post for similar problem discussion. http://www.postgresql-archive.org/Re-Crash-observed-during-the-start-of-the-Postgres-process-td5958225.html 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. I tried to read the postgres code the get the clear map. But still confused. Are you aware and would you kindly explain the relationship behind? Or give me some hint how to investigate it? -- View this message in context: http://www.postgresql-archive.org/Is-there-possibility-btree-redo-with-XLOG-BTREE-DELETE-done-between-standby-redo-and-the-end-of-backp-tp5963066p5963181.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general