Re: WAL's listing in pg_xlog by some sql query

Поиск
Список
Период
Сортировка
От Sameer Kumar
Тема Re: WAL's listing in pg_xlog by some sql query
Дата
Msg-id CADp-Sm6w3uW7N8D3JJTV6RA+yOxAOS14OSEmaxFkeRwO9HvCGA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WAL's listing in pg_xlog by some sql query  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: WAL's listing in pg_xlog by some sql query  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general


On Fri, Jun 3, 2016 at 4:30 AM Stephen Frost <sfrost@snowman.net> wrote:
* Sameer Kumar (sameer.kumar@ashnik.com) wrote:
> On Fri, 3 Jun 2016, 12:14 a.m. Alex Ignatov, <a.ignatov@postgrespro.ru>
> wrote:
> > Can I list all WAL files in pg_xlog  by using some sql query in Postgres?
>
> Try
>
> Select pg_ls_dir('pg_xlog');

Note that this currently requires superuser privileges.

Given the usefulness of this specific query and that it could be used
without risk of the user being able to gain superuser access through it,
I'd like to see a new function added which does not have the superuser
check, but is not allowed to be called by public initially either.

Can I not wrap it around another user defined function with SECURITY DEFINER and grant privilege to specific users who can use it?
 

Something along the lines of 'pg_xlog_file_list()', perhaps.  There is a
check in check_postgres.pl which could take advantage of this also.
Should be a very straight-forward function to write, perhaps good as a
starter project for someone.

Thanks!

Stephen
--
--
Best Regards
Sameer Kumar | DB Solution Architect 
ASHNIK PTE. LTD.

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Patrick Baker
Дата:
Сообщение: Re: PL/PGSQL + inserts+updates+limit - Postgres 9.3
Следующее
От: Patrick Baker
Дата:
Сообщение: Re: PL/PGSQL + inserts+updates+limit - Postgres 9.3