Re: [GENERAL] Monitor pg_xlog size via SQL with postgres 9.4

2016-09-22 Thread Sylvain Marechal
Thank you all, I thought there may be a specific posgresql stored procedure that did the work of enumerating the files of the pg_xlog directory to get its full size, or may be one that gave the full size of the server databases including pg_xlog. Nevermind, this does the work. Regards, Sylvain ​

Re: [GENERAL] Monitor pg_xlog size via SQL with postgres 9.4

2016-09-22 Thread hubert depesz lubaczewski
On Thu, Sep 22, 2016 at 02:23:20PM +0200, Sylvain Marechal wrote: > is there a way to monitor the size of the pg_xlog directory in SQL? The Assuming you have superuser privileges, it will most likely work: select sum( (f).size ) from (select pg_stat_file('pg_xlog/' || pg_ls_dir) as f from

Re: [GENERAL] Monitor pg_xlog size via SQL with postgres 9.4

2016-09-22 Thread Francisco Olarte
Hello: On Thu, Sep 22, 2016 at 2:23 PM, Sylvain Marechal 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.

Re: [GENERAL] Monitor pg_xlog size via SQL with postgres 9.4

2016-09-22 Thread Jehan-Guillaume de Rorthais
On Thu, 22 Sep 2016 14:23:20 +0200 Sylvain Marechal wrote: > Hello all, > > 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

[GENERAL] Monitor pg_xlog size via SQL with postgres 9.4

2016-09-22 Thread Sylvain Marechal
Hello all, 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. I know I can get the retained size for existing replication slots segment in case there are