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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
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 03:51:15
Message-ID: YYnwM2VvOQpgyjkN@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

> 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.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-11-09 03:51:39 Re: consistently use "ProcSignal" instead of "procsignal" in code comments
Previous Message Fujii Masao 2021-11-09 03:41:20 Re: [PATCH] pg_stat_statements Configuration Parameters Documentation