Re: [PATCH v1] pg_ls_tmpdir to show directories

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: [PATCH v1] pg_ls_tmpdir to show directories
Date: 2020-03-03 20:35:48
Message-ID: 3656DFBA-7DFD-4A7F-BF55-BBB943AB0658@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/3/20, 12:24 PM, "Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com> wrote:
> 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.

+1

Nathan

Browse pgsql-hackers by date

  From Date Subject
Next Message David Zhang 2020-03-03 21:32:05 Re: Fastpath while arranging the changes in LSN order in logical decoding
Previous Message Alvaro Herrera 2020-03-03 20:23:13 Re: [PATCH v1] pg_ls_tmpdir to show directories