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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: michael(at)paquier(dot)xyz
Cc: daniel(at)yesql(dot)se, guopa(at)vmware(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, ibrar(dot)ahmad(at)gmail(dot)com, alvherre(at)2ndquadrant(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, a(dot)lubennikova(at)postgrespro(dot)ru, pasim(at)vmware(dot)com, thomas(dot)munro(at)gmail(dot)com, horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp, pgsql-hackers(at)postgresql(dot)org
Subject: Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Date: 2021-11-09 08:05:49
Message-ID: 20211109.170549.1466919021121385565.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Tue, 9 Nov 2021 12:51:15 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> On Mon, Nov 08, 2021 at 05:55:16PM +0900, Kyotaro Horiguchi wrote:
>
> I have quickly looked at the patch set.
>
> > 0001: (I don't remember about this, though) I don't see how to make it
> > work on Windows. Anyway the next step would be to write comments.
>
> Look at Utils.pm where we have dir_symlink, then. symlink() does not
> work on WIN32, so we have a wrapper that uses junction points. FWIW,
> I don't like much the behavior you are enforcing in init_from_backup
> when coldly copying a source path, but I have not looked enough at the
> patch set to have a strong opinion about this part, either.

Thanks for the info. If we can handle symlink on Windows, we don't
need to have a cold copy.

> > 0002: I didn't see it in details and didn't check if it finds the
> > issue but it actually scceeds with the fix. The change to
> > poll_query_until is removed since it doesn't seem actually used.
>
> +# Create tablespace
> +my $dropme_ts_master1 = PostgreSQL::Test::Utils::tempdir();
> +$dropme_ts_master1 =
> PostgreSQL::Test::Utils::perl2host($dropme_ts_master1);
> +my $dropme_ts_master2 = PostgreSQL::Test::Utils::tempdir();
> +$dropme_ts_master2 =
> PostgreSQL::Test::Utils::perl2host($dropme_ts_master2);
> +my $source_ts_master = PostgreSQL::Test::Utils::tempdir();
> +$source_ts_master =
> PostgreSQL::Test::Utils::perl2host($source_ts_master);
> +my $target_ts_master = PostgreSQL::Test::Utils::tempdir();
> +$target_ts_master =
> PostgreSQL::Test::Utils::perl2host($target_ts_master);
>
> Rather than creating N temporary directories, it would be simpler to
> create only one, and have subdirs in it for the rest? It seems to me
> that it would make debugging much easier. The uses of perl2host()
> seem sufficient.

Thanks for the suggestion. My eyeballs got hopping around looking
that part so I gave up looking there in more detail:p I agree to that.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message 近藤雄太 2021-11-09 08:45:27 Re: Missing include <openssl/x509.h> in be-secure-openssl.c?
Previous Message Pavel Stehule 2021-11-09 08:01:46 Re: [PROPOSAL] new diagnostic items for the dynamic sql