Re: Regression test PANICs with master-standby setup on samemachine - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Regression test PANICs with master-standby setup on samemachine
Date
Msg-id 20190507.101654.260277299.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Regression test PANICs with master-standby setup on same machine  (Andres Freund <andres@anarazel.de>)
Responses Re: Regression test PANICs with master-standby setup on same machine  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hello.

At Fri, 26 Apr 2019 12:25:10 -0700, Andres Freund <andres@anarazel.de> wrote in
<20190426192510.dndtaxslneoh4rs5@alap3.anarazel.de>
> On 2019-04-26 17:29:56 +0900, Kyotaro HORIGUCHI wrote:
> > Win32 implement cannot have symbolic link feature as Linux-like
> > OSes for some restrictions. (Windows 7 and 10 behave differently,
> > as I heard.)
> > 
> > So the 0002 patch implemnets "fake" symbolic link as mentioned in
> > its commit message.
> 
> I'm confused - what does this have to do with the topic at hand? Also,
> don't we already emulate symlinks with junction points?

Just to know how we have, or whether we can have relative
tablespaces on Windows. The answer for the second question is
"no" for relative symbolic links.

The current implement based on reparse point emulates *nix
symlinks partly. It is using "mount point"(= junktion point)
which accepts only absolute paths (to a directory).

Windows has an API CreateSymbolincLink() but it needs
administrator privilege at least on Win7. Giving a flag allows
unprivileged creation if the OS is running under "Developer
Mode". On Windows10 (I don't have one), AFAIK
CreateSymbolicLink() is changed not to need the privilege, but
the flag in turn leads to error that "invalid flag".

Reparse point also can implement symbolic link but it needs
administrator privilege at least on Windows7.


The fake symlinks need correction after the data directory and
tablespsce directory are moved. Maybe needs to call
CorrectSymlink() or something at startup... Or relative
tablespaces should be rejected on Windows?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: reindexdb & clusterdb broken against pre-7.3 servers
Next
From: "Matsumura, Ryo"
Date:
Subject: RE: SQL statement PREPARE does not work in ECPG