Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJL4F-0007c7-SO for pgsql-general@arkaria.postgresql.org; Fri, 09 Jun 2017 14:39:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dJL4F-00044p-F0 for pgsql-general@arkaria.postgresql.org; Fri, 09 Jun 2017 14:39:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dJL4D-00042t-Vr for pgsql-general@postgresql.org; Fri, 09 Jun 2017 14:39:14 +0000 Received: from serveurmail01.codata.be ([82.146.123.190]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJL4A-0006ZB-41 for pgsql-general@postgresql.org; Fri, 09 Jun 2017 14:39:12 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id A3B04900D0; Fri, 9 Jun 2017 16:39:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at serveurmail01.codata.be Received: from serveurmail01.codata.be ([127.0.0.1]) by localhost (serveurmail01.codata.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f-EfnU+LMeCH; Fri, 9 Jun 2017 16:39:06 +0200 (CEST) Received: from [10.0.0.100] (38-179-112-217.fix.adsl.belcenter.be [217.112.179.38]) by serveurmail01.codata.be (Postfix) with ESMTPSA id 2D2A5900CC; Fri, 9 Jun 2017 16:39:06 +0200 (CEST) Subject: Re: pg_upgrade --link on Windows To: Bruce Momjian , "Arnaud L." Cc: PG-General Mailing List References: <8da3dbd9-7daf-5589-0cc8-0eede930a492@codata.eu> <20170609140724.GB21215@momjian.us> Reply-To: arnaud.listes@codata.eu From: "Arnaud L." Message-ID: Date: Fri, 9 Jun 2017 16:39:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170609140724.GB21215@momjian.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) 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 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