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-25 09:23:09
Message-ID: 1495704189413-5963181.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message anthonymarc 2017-05-25 10:06:51 Buy counterfeit money ( morganmoore401@gmail.com )euros,dollars,pounds, SAR,ZAR,AED
Previous Message Karsten Hilbert 2017-05-25 07:24:53 Re: pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"