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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: y39chen <yan-jack(dot)chen(at)nokia(dot)com>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup
Date: 2017-05-25 12:33:27
Message-ID: CAB7nPqRwLzPL8c3Q+2vJ=KPEgULZqP9uPfTig4SwUtuZpW8fjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 25, 2017 at 5:23 AM, y39chen <yan-jack(dot)chen(at)nokia(dot)com> wrote:
> 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.

You should look at the relationship between the code of postmaster.c
dealing with updates of pmState and how the startup process (xlog.c)
lets the postmaster know when it can accept incoming connections. Once
a set of conditions is met, the startup process will let the
postmaster know if it is safe to accept connections on a hot standby.
That's a good study and the code is well-commented, so I let you guess
what are those conditions and how they are met during recovery.
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-05-25 13:30:38 Re: pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"
Previous Message Achilleas Mantzios 2017-05-25 12:30:39 Re: Inheritance and foreign keys