Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)
Date
Msg-id 20200718201532.GV23581@telsasoft.com
Whole thread Raw
In response to Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Tue, Jul 14, 2020 at 10:08:39PM -0500, Justin Pryzby wrote:
> I'm still missing feedback from committers about the foundation of this
> approach.

Now rebased on top of fix for my own bug report (1d09fb1f).

I also changed argument handling for pg_ls_dir_recurse().

Passing '.' gave an initial path of . (of course) but then every other path
begins with './' which I didn't like, since it's ambiguous with empty path, or
.// or ././ ...  And one could pass './' which gives different output (like
././).  

So I specially handled the input of '.'.  Maybe the special value should be
NULL instead of ''.  But it looks no other system functions are currently
non-strict.

For pg_rewind testcase, getting the output path+filename uses a coalesce, since
the rest of the test does stuff like strcmp("pg_wal").

Still waiting for feedback from a committer.

-- 
Justin

Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: CID 1428952 (#1 of 1): Out-of-bounds access (OVERRUN) (src/backend/commands/async.c)
Next
From: Peter Geoghegan
Date:
Subject: Re: Default setting for enable_hashagg_disk