Re: : : ReplicationSlots: : - Mailing list pgsql-admin

From Shreeyansh Dba
Subject Re: : : ReplicationSlots: :
Date
Msg-id CAGDYbUNLbXB7c3Qqs5=8Gox8ESbx5Y5YJUefSe3=wt8PX5k9fg@mail.gmail.com
Whole thread Raw
In response to : : ReplicationSlots: :  (JD <venkijd@gmail.com>)
List pgsql-admin
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
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.



On Mon, Jun 25, 2018 at 5:30 PM, JD <venkijd@gmail.com> 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 .

pgsql-admin by date:

Previous
From: JD
Date:
Subject: : : ReplicationSlots: :
Next
From: Rui DeSousa
Date:
Subject: Re: Investigate postgres 9.6.3 repmgr lag 4.0.4