pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: y39chen <yan-jack.chen@nokia.com>
To: pgsql-general@postgresql.org
Subject: Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup
Date: Thu, 25 May 2017 18:19:53 -0700 (MST)
Message-ID: <1495761593082-5963349.post@n3.nabble.com> (raw)
In-Reply-To: <15664.1495720075@sss.pgh.pa.us>
References: <1495609157661-5963011.post@n3.nabble.com>
	<2253.1495639128@sss.pgh.pa.us>
	<CAB7nPqRLBA9vxT+o2_JOThKzHGbGpmZyTbJBRR1jW5QKq+NeYQ@mail.gmail.com>
	<2353.1495640833@sss.pgh.pa.us>
	<CAB7nPqT3S_wG3J3GXeaXDgeS1sdwgz52F=Ze+uBbrWX89EO4wQ@mail.gmail.com>
	<1495704189413-5963181.post@n3.nabble.com>
	<15664.1495720075@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

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-betwee...
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



view thread (9+ messages)

Message-ID: <1495761593082-5963349.post@n3.nabble.com>
Permalink:  ../1495761593082-5963349.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1495761593082-5963349.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: yan-jack.chen@nokia.com
  Subject: Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup
  In-Reply-To: <1495761593082-5963349.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox