pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arnaud L. <arnaud.listes@codata.eu>
To: Bruce Momjian <bruce@momjian.us>
To: Arnaud L. <arnaud.listes@codata.eu>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: pg_upgrade --link on Windows
Date: Fri, 9 Jun 2017 16:39:05 +0200
Message-ID: <a892509c-0eb4-42a4-1370-6cb0ac3bc1c3@codata.eu> (raw)
In-Reply-To: <20170609140724.GB21215@momjian.us>
References: <8da3dbd9-7daf-5589-0cc8-0eede930a492@codata.eu>
	<20170609140724.GB21215@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

Le 9/06/2017 à 16:07, Bruce Momjian a écrit :
> I was told junction points on Windows were hard links and no one has
> ever complained about not being able to remove them.

Sorry, I think my explanation was not very clear.
You can remove the link, but the point is to remove the target (i.e. the 
old-data-dir).
You can do this with a hard link (there still exists a hardlink pointing 
to the inode so it remains), but with a soft link you end up with a link 
to nothing.
Deleting a junction target in Windows will work, but you'll have an 
error trying to access the junction directory (directory not found).

See this page for more details :
http://cects.com/overview-to-understanding-hard-links-junction-points-and-symbolic-links-in-windows/

Under "Hard Link (Linking for individual files)" :
"If the target is deleted, its content is still available through the 
hard link"

Junction Point (Directory Hard Link):
"If the target is moved, renamed or deleted, the Junction Point still 
exists, but points to a non-existing directory"

BUT, when I try to "pg_upgrade --link --check" with old-data-dir and 
new-data-dir on different volumes, I get an error saying that both 
directories must be on the same volume if --link is used.
So maybe pg_upgrade uses hard-links (i.e. to files), and only the 
documentation is wrong by calling them junctions (i.e. soft links to 
files) ?

Regards
--
Arnaud


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (14+ messages)  latest in thread

Message-ID: <a892509c-0eb4-42a4-1370-6cb0ac3bc1c3@codata.eu>
Permalink:  ../a892509c-0eb4-42a4-1370-6cb0ac3bc1c3@codata.eu/
Also on:    postgresql.org/message-id/a892509c-0eb4-42a4-1370-6cb0ac3bc1c3@codata.eu

 · 

reply

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: arnaud.listes@codata.eu, bruce@momjian.us, pgsql-general@postgresql.org
  Subject: Re: pg_upgrade --link on Windows
  In-Reply-To: <a892509c-0eb4-42a4-1370-6cb0ac3bc1c3@codata.eu>

* 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