Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j9E4Y-00004r-Hh for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 20:23:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9E4X-0003Sv-Az for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Mar 2020 20:23:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j9E4W-0003So-Uv for pgsql-hackers@lists.postgresql.org; Tue, 03 Mar 2020 20:23:21 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j9E4T-0003Nt-8L for pgsql-hackers@postgresql.org; Tue, 03 Mar 2020 20:23:19 +0000 Received: by mail-qk1-x741.google.com with SMTP id u124so4741286qkh.13 for ; Tue, 03 Mar 2020 12:23:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=V8oo/JxPf8aZSD/xwpiengeuX/wkc90rVGXYte50Jt8=; b=HLv/NCNNJ77s0RQc22+nrKFgVm5xjrdESEqTwrOByLw0BsNT1x/vCrPpQNvMODNTC5 3dfRnf5DCVyzOPvjI/OT49BBPlfQQ+7P8QH/yU0dDAXcGYDdqFxGTa+0GIvIPIeH3AEi 1TYa09sUooAELQx3sXw2GpEV2dS6wDfTv0Ql29dUsazWLlteFAyebvHNv/qtGyqKfb32 l0hoXPEOyWdb5IjAIHPQoOq1sreq7kNoIYquzrNJpJARwIZZzeprQfFnguMuH8Ckk3A9 7Hp1NajBBBiwM3wpeSV2MYMKnAsb2vUq/RjcB9ADk2HYcQ5yvBCrBbPbKrUFFSB4EkK/ 5s2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=V8oo/JxPf8aZSD/xwpiengeuX/wkc90rVGXYte50Jt8=; b=op6iWBErFU/exkkR3013CCx1xa+OeAm5uTzpc01NLCA5sYHlXiYFKrTxR/QzW0tz6e VtPmO5b7wV4KV2VdJsry3lAccWXkZp6yFPOWsyoIuXyEShqMuxtQit6K8SLB5km10x7B WlxrQLXctyPPJkw6B5rBGaPYWZn1gMzG0L90l9VjXdQbKgYeQ/WGksTf1fAclIMsSyaA 3lt7S9qZGOPWzH4ztg0I4QRYDyvOqsOyQGudGgN4hbj6wpftWLHWNJmBJN4jUuNUn8xC p03cU+vEM3coQcg6pXTtqy4L+OsXpxQ5OYNjD6XicWGTYlLoZwfwmI6UmUg5aVOCqeVz uqew== X-Gm-Message-State: ANhLgQ1hKhfE45XCxN5+l8VdwihAD8qgpyZuaDSsGwXn/i1SK1a6Ivxk pQPruPq3Nsd2JCDDMk1O1dznwA== X-Google-Smtp-Source: ADFU+vtWVwHibBfG0SkpQWyPEFD6BkwxQbIwU53aWtAh3iHcwsfY2k4qLdQnB/uRcfyyLMxZqR5V/w== X-Received: by 2002:a37:7c47:: with SMTP id x68mr5974551qkc.8.1583266996380; Tue, 03 Mar 2020 12:23:16 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.31.1]) by smtp.gmail.com with ESMTPSA id o3sm12562873qkk.87.2020.03.03.12.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2020 12:23:16 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 96A793006B7; Tue, 3 Mar 2020 17:23:13 -0300 (-03) Date: Tue, 3 Mar 2020 17:23:13 -0300 From: Alvaro Herrera To: Justin Pryzby Cc: David Steele , Fabien COELHO , pgsql-hackers@postgresql.org, "Bossart, Nathan" , Thomas Munro Subject: Re: [PATCH v1] pg_ls_tmpdir to show directories Message-ID: <20200303202313.GA28076@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200303200117.GI684@telsasoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Mar-03, Justin Pryzby wrote: > But I don't think it makes sense to go through more implementation/review > cycles without some agreement from a larger group regarding the > desired/intended interface. Should there be a column for "parent dir" ? Or a > column for "is_dir" ? Should dirs be shown at all, or only files ? IMO: is_dir should be there (and subdirs should be listed), but parent_dir should not appear. Also, the "path" should show the complete pathname, including containing dirs, starting from whatever the "root" is for the operation. So for the example in the initial email, it would look like path isdir pgsql_tmp11025.0.sharedfileset/ t pgsql_tmp11025.0.sharedfileset/0.0 f pgsql_tmp11025.0.sharedfileset/1.0 f plus additional columns, same as pg_ls_waldir et al. I'd rather not have the code assume that there's a single level of subdirs, or assuming that an entry in the subdir cannot itself be a dir; that might end up hiding files for no good reason. I don't understand what purpose is served by having pg_ls_waldir() hide directories. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services