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 1nZ1Mt-0002S7-Fn for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 02:13:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZ1Ms-00055q-DH for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 02:13:58 +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 1nZ1Ms-00055b-07 for pgsql-hackers@lists.postgresql.org; Tue, 29 Mar 2022 02:13:58 +0000 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nZ1Mp-0000wR-PP for pgsql-hackers@postgresql.org; Tue, 29 Mar 2022 02:13:57 +0000 Received: by mail-io1-xd2f.google.com with SMTP id r2so19360619iod.9 for ; Mon, 28 Mar 2022 19:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TzW3cx4cCHnvUcRBYwbbj41+bbwBLIAZujLoROfa2gI=; b=I7QQF9q/54NtBsm/HTKG+GKAUmoTObb48UMHtsBuw0jzS1PDxocyHm93H5rHtz+8DW dmCea9nuO8p4yIgRBVkUoIgUi5tnwd2L6QlwXpfnkWHgbaCHeMr2as5v2IojZryjcYzd gFXgg7J2XT+Q1JdnWWeKHAS3ik+dILz3C5eB6SvMb0RdNrAaehNSbgN5GfH0LCK9Rbvs zq+J4MM/jWbALVy3l4XiUqR3REp0mq5mke27X1l1NMrpekTrRmBJvfHmERBxTx1bmmLo S8vjXVE/5BsqTwx2/vWcZMu963u/IZ/6DHkT2uOkZWjbqBxDSq5M/wOQyUQZ77GqZsmc HIbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TzW3cx4cCHnvUcRBYwbbj41+bbwBLIAZujLoROfa2gI=; b=ehf19tfl3LLnNrgeFG2JAtmyuF6x3qNhfstEaKelG0h3udQ0IBeFCrX+Pjadc9ttmp QR3doiYMiBEc02V0M3DgpT1mEGgR8lvUQLdYejHAnHXBbCHBT/mxiZiejExFjRm4sw3i 1rD3fAmu4Lejq525wDNRlJ8LblHGkMddCAr/h5UB4ww/lvVmAVPLnQtDPwI175kHAd8R uCbIoJBZW6MdltgllgrS3RJ7sgJSLBuH10Tuuntj8ds7lvfDTdPH3J1b3vCqo61sbus3 haz66MaI9bZaB7Tc3510Zlmso0jdYAPXrvupp7T6znYHk5pIz/lOSJ47ETWSgoLshm4N wxGA== X-Gm-Message-State: AOAM533hd4CTblxWzkc8G3QggI2r397bb2e3V8U64Le+hpkJEsybwL5M bSQi0TGfp5vvUN/Wwpd5cTLMtA== X-Google-Smtp-Source: ABdhPJyTryMTGprUGDYUvuSRwFduP8lzr4jwQQT2eOFuwGDAF4FxohL/dFdG793H4QRFas1PqVCRgg== X-Received: by 2002:a05:6638:2101:b0:319:d53e:5663 with SMTP id n1-20020a056638210100b00319d53e5663mr15160525jaj.115.1648520033932; Mon, 28 Mar 2022 19:13:53 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id u11-20020a056e02080b00b002c87d5830cbsm6855621ilm.40.2022.03.28.19.13.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Mar 2022 19:13:53 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id A7D6D8008B3; Mon, 28 Mar 2022 21:13:52 -0500 (CDT) Date: Mon, 28 Mar 2022 21:13:52 -0500 From: Justin Pryzby To: Michael Paquier Cc: Andres Freund , Fabien COELHO , "Bossart, Nathan" , Tom Lane , Stephen Frost , Alvaro Herrera , David Steele , pgsql-hackers@postgresql.org, Thomas Munro Subject: Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Message-ID: <20220329021352.GW28503@telsasoft.com> References: <2AF5FE35-82CB-4259-BF97-30D947803132@amazon.com> <20211124000444.GX17618@telsasoft.com> <20211223173631.GE17618@telsasoft.com> <20220125192755.GK23027@telsasoft.com> <20220309165044.GB27651@telsasoft.com> <20220322012828.nugorvsuiutydjkv@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Mar 26, 2022 at 08:23:54PM +0900, Michael Paquier wrote: > On Wed, Mar 23, 2022 at 03:17:35PM +0900, Michael Paquier wrote: > > FWIW, per my review the bit of the patch set that I found the most > > relevant is the addition of a note in the docs of pg_stat_file() about > > the case where "filename" is a link, because the code internally uses > > stat(). The function name makes that obvious, but that's not > > commonly known, I guess. Please see the attached, that I would be > > fine to apply. > > Hmm. I am having second thoughts on this one, as on Windows we rely > on GetFileInformationByHandle() for the emulation of stat() in > win32stat.c, and it looks like this returns some information about the > junction point and not the directory or file this is pointing to, it > seems. Where did you find that ? What metadata does it return about the junction point ? We only care about a handful of fields.