Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJMaa-0004Oq-8l for pgsql-general@arkaria.postgresql.org; Fri, 09 Jun 2017 16:16:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dJMaZ-0006U5-RP for pgsql-general@arkaria.postgresql.org; Fri, 09 Jun 2017 16:16:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dJMY6-0003We-JZ for pgsql-general@postgresql.org; Fri, 09 Jun 2017 16:14:10 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dJMY2-0004l0-OT for pgsql-general@postgresql.org; Fri, 09 Jun 2017 16:14:10 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dJMXw-0005MJ-4P for pgsql-general@postgresql.org; Fri, 09 Jun 2017 18:14:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: George Neuner Subject: Re: pg_upgrade --link on Windows Date: Fri, 09 Jun 2017 12:13:58 -0400 Lines: 44 Message-ID: <4efljcdj859mutoek8olohnjknuoaqo3m4@4ax.com> References: <8da3dbd9-7daf-5589-0cc8-0eede930a492@codata.eu> <20170609140724.GB21215@momjian.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@blaine.gmane.org X-Newsreader: Forte Agent 6.00/32.1186 X-Antivirus: Avast (VPS 170609-0, 06/09/2017), Outbound message X-Antivirus-Status: Clean X-Host-Lookup-Failed: Reverse DNS lookup failed for 195.159.176.226 (failed) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On Fri, 9 Jun 2017 10:07:24 -0400, 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. 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).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa363878(v=vs.85).aspx https://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