Re: Monitor pg_xlog size via SQL with postgres 9.4
От | Francisco Olarte |
---|---|
Тема | Re: Monitor pg_xlog size via SQL with postgres 9.4 |
Дата | |
Msg-id | CA+bJJbxbi0WjKGv7i9tFEROct4r21VHv5C4=3HHyPK5-JSnVKw@mail.gmail.com обсуждение исходный текст |
Ответ на | Monitor pg_xlog size via SQL with postgres 9.4 (Sylvain Marechal <marechal.sylvain2@gmail.com>) |
Список | pgsql-general |
Hello: On Thu, Sep 22, 2016 at 2:23 PM, Sylvain Marechal <marechal.sylvain2@gmail.com> wrote: > is there a way to monitor the size of the pg_xlog directory in SQL? The goal > is to monitor the pg_xlog file without ressorting to a 'du' like solution > that needs a direct access to the machine. Well AFAIK SQL doesn't even have the concept of a directory ( functions callable from SQL provide it, but SQL is for databases & AMOF you can have a perfectly valid SQL db without disks ), so I assume you want some way to get at the machine disk usage without opening a shell on it, from a db client. You could try one of the functions in https://www.postgresql.org/docs/9.5/static/functions-admin.html#FUNCTIONS-ADMIN-GENFILE and many of the untrusted programming languages for postgres functions ( plperl, plpython, etc ) has methods of calling stat in the server. Francisco Olarte.
В списке pgsql-general по дате отправления: