Hi JD,
You can use the below query to get the WAL file size location.
PostgreSQL-9.x
select pg_size_pretty(sum(((pg_stat_file('pg_xlog/'||fname)).size))) as total_size from pg_ls_dir('pg_xlog') as t(fname);
PostgreSQL-10.x
PostgreSQL-9.x
select pg_size_pretty(sum(((pg_stat_file('pg_xlog/'||fname)).size))) as total_size from pg_ls_dir('pg_xlog') as t(fname);
PostgreSQL-10.x
select pg_size_pretty(sum(((pg_stat_file('pg_wal/'||fname)).size))) as total_size from pg_ls_dir('pg_wal') as t(fname);
Hope this helps.
Hope this helps.
On Mon, Jun 25, 2018 at 5:30 PM, JD <venkijd@xxxxxxxxx> wrote:
Hi team,Is there any way to calculate WAL file mount location size ? If we use replactation slots or some one guide best method use them ? That would great help .