Re: standby recovery fails (tablespace related) (tentative patch and discussion)

From: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>
To: Asim R P <apraveen(at)pivotal(dot)io>, Paul Guo <pguo(at)pivotal(dot)io>, Alexandra Wang <leiwang(at)pivotal(dot)io>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Date: 2019-12-26 14:45:19
Message-ID: 34500455-1092-ecbf-ae07-cefafdaf8985@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

20.09.2019 15:23, Asim R P wrote:
> On Thu, Sep 19, 2019 at 5:29 PM Asim R P <apraveen(at)pivotal(dot)io
> <mailto:apraveen(at)pivotal(dot)io>> wrote:
> >
> > In order to fix the test failures, we need to distinguish between a
> missing database directory and a missing tablespace directory.  And
> also add logic to forget missing directories during tablespace drop. 
> I am working on it.
>
> Please find attached a solution that builds on what Paul has propose. 
> A hash table, similar to the invalid page hash table is used to track
> missing directory references.  A missing directory may be a tablespace
> or a database, based on whether the tablespace is found missing or the
> source database is found missing.  The crash recovery succeeds if the
> hash table is empty at the end.
>
The v6-0003 patch had merge conflicts due to the recent
'xl_dbase_drop_rec' change, so I rebased it.
See v7-0003 in attachment. Changes are pretty straightforward, though It
would be great, if you could check them once more.

Newly introduced test 4 in t/011_crash_recovery.pl fails without the
patch and passes with it.
It seems to me that everything is fine, so I mark it "Ready For Committer"

--
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
v6-0001-Support-node-initialization-from-backup-with-tabl.patch text/x-patch 2.1 KB
v6-0002-Tests-to-replay-create-database-operation-on-stan.patch text/x-patch 9.8 KB
v7-0003-Fix-replay-of-create-database-records-on-standby.patch text/x-patch 12.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mahendra Singh 2019-12-26 14:50:14 Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema
Previous Message Michael Paquier 2019-12-26 13:53:29 Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema