Re: : : ReplicationSlots: :

From: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
To: JD <venkijd(at)gmail(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: : : ReplicationSlots: :
Date: 2018-06-25 12:53:48
Message-ID: CAGDYbUNLbXB7c3Qqs5=8Gox8ESbx5Y5YJUefSe3=wt8PX5k9fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

<http://www.shreeyansh.com>

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Rui DeSousa 2018-06-25 14:21:23 Re: Investigate postgres 9.6.3 repmgr lag 4.0.4
Previous Message JD 2018-06-25 12:00:39 : : ReplicationSlots: :