Re: [ADMIN] how to find a pg_toast table's primary table - Mailing list pgsql-admin

From Joshua D. Drake
Subject Re: [ADMIN] how to find a pg_toast table's primary table
Date
Msg-id fa0a390a-ffbd-8da9-373a-1b981063ca4d@commandprompt.com
Whole thread Raw
In response to [ADMIN] how to find a pg_toast table's primary table  (ProPAAS DBA <dba@propaas.com>)
List pgsql-admin
On 12/13/2016 03:24 PM, ProPAAS DBA wrote:
> Hi all;
>
>
> I'm seeing this table as the most vacuumed table:
>
>
> pg_toast.pg_toast_16784
>
> How do I find the primary table for this toast table?

Within the database:

select oid::regclass from pg_class where reltoastrelid='16784'::regclass;

JD;

--
Command Prompt, Inc.                  http://the.postgres.company/
                         +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.


pgsql-admin by date:

Previous
From: ProPAAS DBA
Date:
Subject: [ADMIN] how to find a pg_toast table's primary table
Next
From: Jerry Sievers
Date:
Subject: Re: [ADMIN] how to find a pg_toast table's primary table