Re: [GENERAL] pg_upgrade --link on Windows - Mailing list pgsql-general

From Adrian Klaver
Subject Re: [GENERAL] pg_upgrade --link on Windows
Date
Msg-id 6a638c60-90bb-4921-8ee4-5fdad68f8b09@aklaver.com
Whole thread Raw
In response to Re: [GENERAL] pg_upgrade --link on Windows  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general
On 06/09/2017 07:07 AM, Bruce Momjian 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.
>

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx

Seems to me the difference is hard links point to file, junctions to
directories.

So if I am following:

https://en.wikipedia.org/wiki/NTFS_junction_point#Creating_or_deleting_a_junction_point

You remove the junction and then the directory it points to.

--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Fabiana Zioti
Date:
Subject: [GENERAL] Enc: Extending SQL in C using VARIABLE length type in user definedtype
Next
From: "btober@computer.org"
Date:
Subject: Re: [GENERAL] Limiting DB access by role after initial connection?