Re: standby recovery fails (tablespace related) (tentative patch and discussion) - Mailing list pgsql-hackers

From Asim R P
Subject Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Date
Msg-id CANXE4Tek5NuyBaS8ZOzbiKEyF+v19gt_JJv4uRtFF2S6xwPb2A@mail.gmail.com
Whole thread Raw
In response to standby recovery fails (tablespace related) (tentative patch and discussion)  (Paul Guo <pguo@pivotal.io>)
Responses Re: standby recovery fails (tablespace related) (tentative patch and discussion)
List pgsql-hackers
On Wed, Apr 17, 2019 at 1:27 PM Paul Guo <pguo@pivotal.io> wrote:
>
> create db with tablespace
> drop database
> drop tablespace.

Essentially, that sequence of operations causes crash recovery to fail
if the "drop tablespace" transaction was committed before crashing.
This is a bug in crash recovery in general and should be reproducible
without configuring a standby.  Is that right?

Your patch creates missing directories in the destination.  Don't we
need to create the tablespace symlink under pg_tblspc/?  I would
prefer extending the invalid page mechanism to deal with this, as
suggested by Ashwin off-list.  It will allow us to avoid creating
directories and files only to remove them shortly afterwards when the
drop database and drop tablespace records are replayed.

Asim



pgsql-hackers by date:

Previous
From: Andrey Lepikhov
Date:
Subject: Do CustomScan as not projection capable node
Next
From: Tom Lane
Date:
Subject: Re: Do CustomScan as not projection capable node