| From: | Francisco Olarte <folarte(at)peoplecall(dot)com> |
|---|---|
| To: | Sylvain Marechal <marechal(dot)sylvain2(at)gmail(dot)com> |
| Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Monitor pg_xlog size via SQL with postgres 9.4 |
| Date: | 2016-09-22 13:16:36 |
| Message-ID: | CA+bJJbxbi0WjKGv7i9tFEROct4r21VHv5C4=3HHyPK5-JSnVKw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hello:
On Thu, Sep 22, 2016 at 2:23 PM, Sylvain Marechal
<marechal(dot)sylvain2(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | hubert depesz lubaczewski | 2016-09-22 14:05:01 | Re: Monitor pg_xlog size via SQL with postgres 9.4 |
| Previous Message | Jehan-Guillaume de Rorthais | 2016-09-22 12:48:25 | Re: Monitor pg_xlog size via SQL with postgres 9.4 |