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

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: WAL's listing in pg_xlog by some sql query
Дата
Msg-id 20160602202940.GS21416@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: WAL's listing in pg_xlog by some sql query  (Sameer Kumar <sameer.kumar@ashnik.com>)
Ответы Re: WAL's listing in pg_xlog by some sql query  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: WAL's listing in pg_xlog by some sql query  (Sameer Kumar <sameer.kumar@ashnik.com>)
Список pgsql-general
* 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.

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

Вложения

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: dumb question
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: WAL's listing in pg_xlog by some sql query