From: George Neuner <gneuner2@comcast.net>
To: pgsql-general@postgresql.org
Subject: Re: pg_upgrade --link on Windows
Date: Fri, 09 Jun 2017 12:13:58 -0400
Message-ID: <4efljcdj859mutoek8olohnjknuoaqo3m4@4ax.com> (raw)
References: <8da3dbd9-7daf-5589-0cc8-0eede930a492@codata.eu>
<20170609140724.GB21215@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
On Fri, 9 Jun 2017 10:07:24 -0400, Bruce Momjian <bruce@momjian.us>
wrote:
>On Fri, Jun 9, 2017 at 12:00:56PM +0200, Arnaud L. wrote:
>> Hi
>>
>> The pg_upgrade documentation for PostgreSQL 9.6 states that --link will use
>> junction points on Windows.
>> Shouldn't it rather user hard-links ?
>> If I'm not mistaken, with junction points (i.e. soft-links to directories),
>> the old data dir cannot be removed.
>> With hard-links to file, we can get rid of the old data dir once we are sure
>> that the upgrade is fine.
>
>I was told junction points on Windows were hard links and no one has
>ever complained about not being able to remove them.
NTFS junctions are a distinct type of symbolic link which is meant for
filesystem mount points. In NTFS "normal" symlinks are restricted to
targets within the same filesystem.
You can use a junction anywhere you want a symlink, but not the
reverse. The downside is that pathname parsing is slower with
junctions than with symlinks because of the possibility that the path
may cross into a different filesystem.
The documentation is not very clear, IMO.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspxhttps://msdn.microsoft.com/en-us/library/windows/desktop/aa363878(v=vs.85).aspxhttps://msdn.microsoft.com/en-us/library/windows/desktop/aa365503(v=vs.85).aspx
The mklink utility can create any of these types of links. Its
documentation does not describe the differences, but is shows that
hard links, symlinks, and junctions all are distinct concepts in
Windows.
https://technet.microsoft.com/en-us/library/cc753194(v=ws.11).aspx
George
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: gneuner2@comcast.net, pgsql-general@postgresql.org
Subject: Re: pg_upgrade --link on Windows
In-Reply-To: <4efljcdj859mutoek8olohnjknuoaqo3m4@4ax.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox