Re: pg_ls_tmpdir to show directories and shared filesets

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David Steele <david(at)pgmasters(dot)net>, pgsql-hackers(at)postgresql(dot)org, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: pg_ls_tmpdir to show directories and shared filesets
Date: 2020-03-07 14:14:37
Message-ID: alpine.DEB.2.21.2003071125340.21542@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Justin,

Some feedback about the v7 patch set.

About v7.1, seems ok.

About v7.2 & v7.3 seems ok, altought the two could be merged.

About v7.4:

The documentation sentences could probably be improved "for for", "used
... used". Maybe:

For the temporary directory for <parameter>tablespace</parameter>, ...
->
For <parameter>tablespace</parameter> temporary directory, ...

Directories are used for temporary files used by parallel
processes, and are shown recursively.
->
Directories holding temporary files used by parallel
processes are shown recursively.

It seems that lists are used as FIFO structures by appending, fetching &
deleting last, all of which are O(n). ISTM it would be better to use the
head of the list by inserting, getting and deleting first, which are O(1).

ISTM that several instances of: "pg_ls_dir_files(..., true, false);"
should be "pg_ls_dir_files(..., true, DIR_HIDE);".

About v7.5 looks like a doc update which should be merged with v7.4.

Alas, ISTM that there are no tests on any of these functions:-(

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2020-03-07 14:24:11 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Previous Message Nikolay Shaplov 2020-03-07 12:14:42 Re: [PATCH] Finally split StdRdOptions into HeapOptions and ToastOptions