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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: robertmhaas(at)gmail(dot)com
Cc: alvherre(at)alvh(dot)no-ip(dot)org, michael(at)paquier(dot)xyz, rjuju123(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Date: 2022-04-01 04:21:57
Message-ID: 20220401.132157.1998467224568735059.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Tue, 29 Mar 2022 09:31:42 -0400, Robert Haas <robertmhaas(at)gmail(dot)com> wrote in
> On Tue, Mar 29, 2022 at 9:28 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > OK, this is a bug that's been open for years. A fix can be committed
> > after the feature freeze anyway.
>
> +1

By the way, may I ask how do we fix this? The existing recovery code
already generates just-to-be-delete files in a real directory in
pg_tblspc sometimes, and elsewise skip applying WAL records on
nonexistent heap pages. It is the "mixed" way.

1. stop XLogReadBufferForRedo creating a file in nonexistent
directories then remember the failure (I'm not sure how big the
impact is.)

2. unconditionally create all objects required for recovery to proceed..
2.1 and igore the failures.
2.2 and remember the failures.

3. Any other?

2 needs to create a real directory in pg_tblspc. So 1?

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-04-01 04:30:00 Re: should vacuum's first heap pass be read-only?
Previous Message Amit Kapila 2022-04-01 04:08:52 Re: Logical replication timeout problem