Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dE56a-0000So-5G for pgsql-general@arkaria.postgresql.org; Fri, 26 May 2017 02:35:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dE56Z-000619-OG for pgsql-general@arkaria.postgresql.org; Fri, 26 May 2017 02:35:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dE3v3-00087K-Kd for pgsql-general@postgresql.org; Fri, 26 May 2017 01:19:57 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dE3v0-0004uU-06 for pgsql-general@postgresql.org; Fri, 26 May 2017 01:19:56 +0000 Received: from mben.nabble.com (unknown [162.253.133.72]) by mwork.nabble.com (Postfix) with ESMTP id 147A144AA1056 for ; Thu, 25 May 2017 18:19:53 -0700 (MST) Date: Thu, 25 May 2017 18:19:53 -0700 (MST) From: y39chen To: pgsql-general@postgresql.org Message-ID: <1495761593082-5963349.post@n3.nabble.com> In-Reply-To: <15664.1495720075@sss.pgh.pa.us> References: <1495609157661-5963011.post@n3.nabble.com> <2253.1495639128@sss.pgh.pa.us> <2353.1495640833@sss.pgh.pa.us> <1495704189413-5963181.post@n3.nabble.com> <15664.1495720075@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 Yeah, I figured out the point(logic). The precondition is should not have any connections accept while recovering. It is clear to me now. Thank you very much. static TransactionId btree_xlog_delete_get_latestRemovedXid(xl_btree_delete *xlrec) { ...... if (*CountDBBackends(InvalidOid)* == 0) return latestRemovedXid; /* * In what follows, we have to examine the previous state of the index * page, as well as the heap page(s) it points to. This is only valid if * WAL replay has reached a consistent database state; which means that * the preceding check is not just an optimization, but is *necessary*. We * won't have let in any user sessions before we reach consistency. */ if (!reachedConsistency) elog(PANIC, "btree_xlog_delete_get_latestRemovedXid: cannot operate with inconsistent data"); ...... } -- 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-tp5963066p5963349.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