pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: wangsh.fnst@fujitsu.com <wangsh.fnst@fujitsu.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: drop tablespace failed when location contains .. on win32
Date: Mon, 31 Jan 2022 12:18:56 -0500
Message-ID: <684309.1643649536@sss.pgh.pa.us> (raw)
In-Reply-To: <18bc9d6b-4c9d-771f-b7d9-f294f3b34d2e@dunslane.net>
References: <TY2PR01MB421975D9184BAF6FBAC2262BF2D89@TY2PR01MB4219.jpnprd01.prod.outlook.com>
	<YT74jO2LwChTmE58@paquier.xyz>
	<20210913.173629.689388354506122738.horikyota.ntt@gmail.com>
	<OS3PR01MB71599B537F68956616FCC4BAF2A69@OS3PR01MB7159.jpnprd01.prod.outlook.com>
	<1479474.1636584211@sss.pgh.pa.us>
	<YZdXYhqtGD0CxIz9@paquier.xyz>
	<20220117004038.fcywmknzj45kiulz@jrouhaud>
	<OS3PR01MB715911F089165E86CBB9D9DAF2589@OS3PR01MB7159.jpnprd01.prod.outlook.com>
	<YeYVpEk/+f5qpS7W@paquier.xyz>
	<OS3PR01MB7159F21067BE3DCC321340B0F25E9@OS3PR01MB7159.jpnprd01.prod.outlook.com>
	<Ye6Rkd1kLvhkTJa1@paquier.xyz>
	<462031.1643579403@sss.pgh.pa.us>
	<18bc9d6b-4c9d-771f-b7d9-f294f3b34d2e@dunslane.net>

Andrew Dunstan <andrew@dunslane.net> writes:
> On 1/30/22 16:50, Tom Lane wrote:
>> Here's a revised patch version that does it like that.  I also
>> reviewed and simplified the canonicalize_path logic.  I think
>> this is committable.

> LGTM

Pushed, thanks for looking.

I think I'm also going to have a look at simplifying some of the
dependent code, just because it feels weird to leave that unfinished.
In particular, Shenhao-san suggested upthread that we could remove
path_contains_parent_reference().  I complained about that at the
time, but I hadn't quite absorbed the fact that an absolute path
is now *guaranteed* not to have any ".." after canonicalize_path.
So the existing calls in adminpack.c and genfile.c are certainly
dead code.  We probably want to keep path_contains_parent_reference()
in case some extension is using it, but seeing that its API spec
already requires the input to be canonicalized, it could be simplified
to just check for ".." at the start.

			regards, tom lane





view thread (23+ messages)

Message-ID: <684309.1643649536@sss.pgh.pa.us>
Permalink:  ../684309.1643649536@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/684309.1643649536@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, michael@paquier.xyz, wangsh.fnst@fujitsu.com, rjuju123@gmail.com, horikyota.ntt@gmail.com
  Subject: Re: drop tablespace failed when location contains .. on win32
  In-Reply-To: <684309.1643649536@sss.pgh.pa.us>
  References: <TY2PR01MB421975D9184BAF6FBAC2262BF2D89@TY2PR01MB4219.jpnprd01.prod.outlook.com> <YT74jO2LwChTmE58@paquier.xyz> <20210913.173629.689388354506122738.horikyota.ntt@gmail.com> <OS3PR01MB71599B537F68956616FCC4BAF2A69@OS3PR01MB7159.jpnprd01.prod.outlook.com> <1479474.1636584211@sss.pgh.pa.us> <YZdXYhqtGD0CxIz9@paquier.xyz> <20220117004038.fcywmknzj45kiulz@jrouhaud> <OS3PR01MB715911F089165E86CBB9D9DAF2589@OS3PR01MB7159.jpnprd01.prod.outlook.com> <YeYVpEk/+f5qpS7W@paquier.xyz> <OS3PR01MB7159F21067BE3DCC321340B0F25E9@OS3PR01MB7159.jpnprd01.prod.outlook.com> <Ye6Rkd1kLvhkTJa1@paquier.xyz> <462031.1643579403@sss.pgh.pa.us> <18bc9d6b-4c9d-771f-b7d9-f294f3b34d2e@dunslane.net> <684309.1643649536@sss.pgh.pa.us>

* 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