Hello. At Fri, 26 Apr 2019 12:25:10 -0700, Andres Freund <and...@anarazel.de> wrote in <20190426192510.dndtaxslneoh4...@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