Re: pg_ls_tmpdir(); AND, Function for listing archive_statusdirectory - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: pg_ls_tmpdir(); AND, Function for listing archive_statusdirectory
Date
Msg-id 20181001153737.GA8041@telsasoft.com
Whole thread Raw
In response to Re: pg_ls_tmpdir()  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-hackers
On Wed, Sep 26, 2018 at 10:36:03PM +0200, Laurenz Albe wrote:
> Bossart, Nathan wrote:
> > Attached is a patch to add a pg_ls_tmpdir() function that lists the
> > contents of a specified tablespace's pgsql_tmp directory.  This is
> > very similar to the existing pg_ls_logdir() and pg_ls_waldir()
> > functions.

On Sun, Sep 30, 2018 at 10:59:20PM +0200, Christoph Moench-Tegeder wrote:
> while setting up monitoring for a new PostgreSQL instance, I noticed that
> there's no build-in way for a pg_monitor role to check the contents of
> the archive_status directory. We got pg_ls_waldir() in 10, but that
> only lists pg_wal - not it's (sic) subdirectory. 

>    It may make sense to have a generic function like
>       pg_ls_dir(dirname text, tablespace oid)
>    instead.  But maybe that's taking it too far...

I see Cristoph has another pg_ls_* function, which suggests that Laurenz idea
is good, and a generic pg_ls function is desirable.

Justin


pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: Re: Add SKIP LOCKED to VACUUM and ANALYZE
Next
From: Andres Freund
Date:
Subject: Re: pg_ls_tmpdir()