Re: pg_ls_waldir() & pg_ls_logdir()

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ls_waldir() & pg_ls_logdir()
Date: 2017-03-16 09:40:10
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers


On Wed, Mar 15, 2017 at 5:27 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Feb 20, 2017 at 6:21 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>> Patch includes the code and doc updates.
> Review:
> + strftime(mtime, 25, "%Y-%m-%d %H:%M:%S %Z",
> localtime(&(attrib.st_ctime)));
> + const int n = snprintf(NULL, 0, "%lld", attrib.st_size);
> + char size[n+1];
> + snprintf(size, n+1, "%lld", attrib.st_size);
> We don't allow variable declarations in mid-block. You've been
> programming in C++ for too long!

Err, yeah. Ooops. Fixed.

> The documentation should be updated to say that access to
> pg_ls_logdir() and pg_ls_waldir() can be granted via the permissions
> system (see the paragraph above the table you updated).
> The four existing functions in the documentation table each have a
> corresponding paragraph below the table, but the two new functions you
> added don't.


> +1 for the concept.

Thanks, updated patch attached.

Dave Page
Twitter: @pgsnake

EnterpriseDB UK:
The Enterprise PostgreSQL Company

Attachment Content-Type Size
lsdir_v2.diff text/plain 8.2 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2017-03-16 09:54:59 Re: pg_ls_waldir() & pg_ls_logdir()
Previous Message Petr Jelinek 2017-03-16 09:13:37 Re: logical replication launcher crash on buildfarm