Re: Toast table get list from instance

From: Sathish Reddy <sathishreddy(dot)postgresql(at)gmail(dot)com>
To: kashi(dot)zeeshan(at)gmail(dot)com
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Toast table get list from instance
Date: 2024-07-04 10:33:18
Message-ID: CA+M9Y+BAeNi2C0MWJji2u=rVsD4Nne4Fmi0dQCf0d=9pdYzdNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks, I'll check it out.

On Thu, Jul 4, 2024, 3:54 PM Kashif Zeeshan <kashi(dot)zeeshan(at)gmail(dot)com> wrote:

> You can use the following query to get the info from one database.
>
> SELECT nspname AS schema_name, c.relname AS toast_table_name, c.oid AS
> toast_table_oid, r.relname AS main_table_name FROM pg_class c JOIN
> pg_namespace n ON n.oid = c.relnamespace LEFT JOIN pg_class r ON
> r.reltoastrelid = c.oid WHERE c.relkind = 't';
>
> But to get info from all the databases then you need to write a shell
> script which will first get all the databases and then run the above query
> on the all returned databases.
>
> Regards
> Kashif Zeeshan
>
> On Thu, Jul 4, 2024 at 2:52 PM Sathish Reddy <
> sathishreddy(dot)postgresql(at)gmail(dot)com> wrote:
>
>> Hi
>> Help me on getting all toast table information from instance level all
>> databases by using select querying in postgres .
>>
>>
>> Thanks
>> Sathish Reddy
>>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2024-07-04 12:47:47 Re: Connection pooler / LDAP auth / Load Balancing on read-only queries
Previous Message Kashif Zeeshan 2024-07-04 10:24:06 Re: Toast table get list from instance