Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup

From: y39chen <yan-jack(dot)chen(at)nokia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup
Date: 2017-05-26 01:19:53
Message-ID: 1495761593082-5963349.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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-between-standby-redo-and-the-end-of-backp-tp5963066p5963349.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jayadevan M 2017-05-26 04:55:20 Re: Inheritance and foreign keys
Previous Message Igor Neyman 2017-05-25 19:23:51 Re: logical replication in PG10 BETA