Re: [PATCH v1] pg_ls_tmpdir to show directories

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: [PATCH v1] pg_ls_tmpdir to show directories
Дата
Msg-id
alpine.DEB.2.21.1912280747370.27864@pseudo
Ответ на
Список
Дерево обсуждения
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Stephen Frost <sfrost@snowman.net>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Stephen Frost <sfrost@snowman.net>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Stephen Frost <sfrost@snowman.net>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) "Bossart, Nathan" <bossartn@amazon.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Fabien COELHO <coelho@cri.ensmp.fr>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Fabien COELHO <coelho@cri.ensmp.fr>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Andres Freund <andres@anarazel.de>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Michael Paquier <michael@paquier.xyz>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Michael Paquier <michael@paquier.xyz>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Greg Stark <stark@mit.edu>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Fabien COELHO <coelho@cri.ensmp.fr>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Fabien COELHO <coelho@cri.ensmp.fr>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Michael Paquier <michael@paquier.xyz>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Michael Paquier <michael@paquier.xyz>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Michael Paquier <michael@paquier.xyz>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Michael Paquier <michael@paquier.xyz>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Peter Smith <smithpb2250@gmail.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Fabien COELHO <coelho@cri.ensmp.fr>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Julien Rouhaud <rjuju123@gmail.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) Justin Pryzby <pryzby@telsasoft.com>

Hello Justin,

>> Why not simply showing the files underneath their directories?
>>
>>   /path/to/tmp/file1
>>   /path/to/tmp/subdir1/file2
>>
>> In which case probably showing the directory itself is not useful,
>> and the is_dir column could be dropped?
>
> The names are expected to look like this:
>
> $ sudo find /var/lib/pgsql/12/data/base/pgsql_tmp -ls
> 142977    4 drwxr-x---   3 postgres postgres     4096 Dec 27 13:51 /var/lib/pgsql/12/data/base/pgsql_tmp
> 169868    4 drwxr-x---   2 postgres postgres     4096 Dec  7 01:35 /var/lib/pgsql/12/data/base/pgsql_tmp/pgsql_tmp11025.0.sharedfileset
> 169347 5492 -rw-r-----   1 postgres postgres  5619712 Dec  7 01:35 /var/lib/pgsql/12/data/base/pgsql_tmp/pgsql_tmp11025.0.sharedfileset/0.0
> 169346 5380 -rw-r-----   1 postgres postgres  5505024 Dec  7 01:35 /var/lib/pgsql/12/data/base/pgsql_tmp/pgsql_tmp11025.0.sharedfileset/1.0
>
> I think we'd have to show sudbdir/file1, subdir/file2, not just file1, file2.
> It doesn't seem useful or nice to show a bunch of files called 0.0 or 1.0.
> Actually the results should be unique, either on filename or (dir,file).

Ok, so this suggests recursing into subdirs, which requires to make a 
separate function of the inner loop.

> It's worth thinking if subdir should be a separate column.

My 0.02 €: I would rather simply keep the full path and just add subdir 
contents, so that the function output does not change at all.

-- 
Fabien.
В списке pgsql-hackers по дате отправления
От: Abdul Yadi AH-2
Дата:
От: Justin Pryzby
Дата:
FAQ