Re: [PATCH v1] pg_ls_tmpdir to show directories

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PATCH v1] pg_ls_tmpdir to show directories
Дата
Msg-id 20200303202313.GA28076@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [PATCH v1] pg_ls_tmpdir to show directories  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: pg_ls_tmpdir to show directories and shared filesets  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Soumyadeep Chakraborty
Дата:
Сообщение: Re: WIP: expression evaluation improvements
Следующее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: [PATCH v1] pg_ls_tmpdir to show directories