Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPg3c-00056L-6U for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Sep 2021 07:07:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPg3a-0007vm-VN for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Sep 2021 07:07:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPg3Z-0007vd-BD for pgsql-hackers@lists.postgresql.org; Mon, 13 Sep 2021 07:07:10 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPg3U-0005lD-EM for pgsql-hackers@lists.postgresql.org; Mon, 13 Sep 2021 07:07:08 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9505D3200939; Mon, 13 Sep 2021 03:06:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 13 Sep 2021 03:06:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=uqDUmbIxgUTqRAlBhT/vBPYytVW 05iqWkyGsfTU7yp8=; b=Kt1Zu7X6gxm8MO029ksgYK6vEqmdb18SkUIevlzhCmr 9ef9/WErHhdL4CAKxRq36QyFC6x1DMBNwQYA+EYK2Em1t2JU+fX7co30KvzinENU NZJ1MpLFagw0hVLk5/etNa58FXUGnxVzYe77/NhoWc7Zwdke6SGl5zzLyop051St 4y3pdfXGWgjsEansUwUeppdlYkAlb/FByGHotdGs/DLraFlt6KzNObqx7HkYluOT 88PYzRmIfo6AKgt1mt1uh4WEhFNV7uuJYnbyEgPFu049Xx0cTDEdkdUZ/fYZWaHK amfIo/F5lUYzu0h8Eoc6ZbjMBUjL0G7YcgPfjzjA19A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=uqDUmb IxgUTqRAlBhT/vBPYytVW05iqWkyGsfTU7yp8=; b=eVBErhr/3cYELnccF3FCSy QXqpRAKoQOjHKpK20FCI9BDjAeRxcN06bsOjbUYuLs2LgADDCBTJD9z59Rzs/57v l7n9L97p6HyIUGrNxRWoapU6+15px3KRwKYpJaGRgOIwHxv2dz/1Vmwx9q0zGXTQ jgTPfjdhWs06scKYyo8yojaR2570LJIos5rVHPjcx1Ao54SiBjUX4DUEzAqh6pZA 7ylSpA/QepMcdfPSEXnNXg612yamBlEmUR+vQSepIEEyv3SUWMTqI/BHW1M0v+U+ j5xyHcWJyDVv4ATQXyW+lr4qrY1rIg/zLob5TNv77MA3icSBv++3lkl6UfbdPK8Q == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegiedguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveej heehieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Sep 2021 03:06:57 -0400 (EDT) Date: Mon, 13 Sep 2021 16:06:52 +0900 From: Michael Paquier To: "wangsh.fnst@fujitsu.com" Cc: Andrew Dunstan , PostgreSQL Hackers , Kyotaro Horiguchi Subject: Re: drop tablespace failed when location contains .. on win32 Message-ID: References: <9d81c415-d15e-743e-1394-b28bdcdd27ae@dunslane.net> <5dc0799e-82ab-cc86-6dc6-915412f2585a@dunslane.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EziUD++veU/+bajz" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --EziUD++veU/+bajz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 12, 2021 at 07:33:23AM +0000, wangsh.fnst@fujitsu.com wrote: > 0001 is a small fix, because I find that is_absolute_path is not appropri= ate,=20 > see comment in skip_drive: > > * On Windows, a path may begin with "C:" or "//network/". #define is_absolute_path(filename) \ ( \ - IS_DIR_SEP((filename)[0]) || \ + (IS_DIR_SEP((filename)[0]) && IS_DIR_SEP((filename)[1])) || \ (isalpha((unsigned char) ((filename)[0])) && (filename)[1] =3D=3D '= :' && \ IS_DIR_SEP((filename)[2])) \ With this change you would consider a path beginning with "/foo/.." as not being an absolute path, but that's not correct. Or am I missing something obvious? > 0003 is a test extension for me to check the action of canonicalize_path. > Do you think is necessary to add this test extension(and some test script= s) to master ? > If necessary, maybe I can use the taptest to test the action of canonica= lize_path > in Linux and Windows. I am not sure that this is worth the cycles spent on, so I would discard it. This will help a lot in reviewing this patch, for sure. And you could add some regression tests to show how much testing you have done, for both WIN32 and non-WIN32. I do that from time to time, and was actually thinking to test this API this way. -- Michael --EziUD++veU/+bajz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmE++IwACgkQnvQgOdby QH1BghAAiUXMu+grDhh0P3sHOlLVUDlGQ9Z4Z6u8nc/wbZfEIplB7IKZbDjISF73 5GuPNT52oQYg1ac6bs7Fj4YNV7421yHLp11S0m853PxUoHe9AsR0/QNKc+b0ph1F vJFfo1o+eF2L3hITkEYDBaw2t9DvTgC+/EkUVpLeNyG6WTNijU61lEyPDgPzzoTZ HOKLBMAMMbDXuw39beYQjs7UwhIEW1nki4drslxX0akCW7XsZMWC6fOrF650wDp6 ShM86xwWDGKEU5dBX1Dz7jfGgb4BHRNB8rfNcvYRfLhflbt4nXSbSRGvsAsQTqzb g4FgCGyTogF1+0WrXOUE0TpmYQZf9nxNNhm+03qgOoyp5zEyhroU7uykPBMeTD9p 0QJSnLwY1+1YVFm5OI0Elwt6iR+9sMt0/XkY4K9y+W0HXzIIW6QF/Lb+gVK/cjZb /8eyb5K/3QooT/FH2l3MTCnoC8DgYInMr8XkP59TJPaKsJCtNFhzZP9qwbV8oSSp qWU95Su7rV6E7CkhGMtvDknJU+NOq9JsP2M7l3a54z23SIq8L9J4FHYHB7DIaOw6 RDc/eRk4Y6zWB6cL9l3JhbxN5OPptO7GDokk95WS/6Cqk3mbwU93JvmmQUtVA6zk NXvrjeeMhNBkHrLwvAiDk+1qE7+2fVBA+5SZ4cL8qOpUuMfSzaQ= =/cpe -----END PGP SIGNATURE----- --EziUD++veU/+bajz--