pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Sathish Reddy <sathishreddy.postgresql@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Toast table infi
Date: Mon, 27 May 2024 12:42:30 +0200
Message-ID: <87e6e5d0a3b2af9364efa9b43715b3edf7f11449.camel@cybertec.at> (raw)
In-Reply-To: <CA+M9Y+CL0BHw-+-_VjmMEgsuqSaMfD2OsMDy+NJHM9E5DRAwsQ@mail.gmail.com>
References: <CA+M9Y+ADnFKpzNO3vxMPffWigaZufWp3BQyNMjgLYdAMz2OnPA@mail.gmail.com>
	<a34423f0651e939bb5c91353951a0faf520881e9.camel@cybertec.at>
	<CA+M9Y+CL0BHw-+-_VjmMEgsuqSaMfD2OsMDy+NJHM9E5DRAwsQ@mail.gmail.com>

On Mon, 2024-05-27 at 15:16 +0530, Sathish Reddy wrote:
> I am looking for all toast tables with size from cluster level all databases.
> it need to perform as like pg_stat_activity

SELECT oid::regclass,
       pg_relation_size(oid)
FROM pg_class
WHERE relkind = 't'
  AND relnamespace = 'pg_toast'::regnamespace;

That will show you all TOAST tables from the current database.

You have to connect to all databases and run the query in each one.

Yours,
Laurenz Albe





view thread (7+ messages)

Message-ID: <87e6e5d0a3b2af9364efa9b43715b3edf7f11449.camel@cybertec.at>
Permalink:  ../87e6e5d0a3b2af9364efa9b43715b3edf7f11449.camel@cybertec.at/
Also on:    postgresql.org/message-id/87e6e5d0a3b2af9364efa9b43715b3edf7f11449.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, sathishreddy.postgresql@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Toast table infi
  In-Reply-To: <87e6e5d0a3b2af9364efa9b43715b3edf7f11449.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox