Re: [HACKERS] pg_ls_waldir() & pg_ls_logdir() - Mailing list pgsql-hackers

From Dave Page
Subject Re: [HACKERS] pg_ls_waldir() & pg_ls_logdir()
Date
Msg-id CA+OCxoztxjubsKLcnTXMF_WQu=xH-zqdo-n6svVei-vqSYOOog@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pg_ls_waldir() & pg_ls_logdir()  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] pg_ls_waldir() & pg_ls_logdir()
List pgsql-hackers
Hi

On Wed, Mar 15, 2017 at 5:27 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Feb 20, 2017 at 6:21 AM, Dave Page <dpage@pgadmin.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.

Added.

> +1 for the concept.

Thanks, updated patch attached.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] logical replication launcher crash on buildfarm
Next
From: Thomas Munro
Date:
Subject: Re: [HACKERS] pg_ls_waldir() & pg_ls_logdir()