From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jerry Sievers <gsievers19@comcast.net>
Cc: ProPAAS DBA <dba@propaas.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: how to find a pg_toast table's primary table
Date: Tue, 13 Dec 2016 18:46:18 -0500
Message-ID: <6624.1481672778@sss.pgh.pa.us> (raw)
In-Reply-To: <86wpf3qu08.fsf@jerry.enova.com>
References: <d37e27d8-7e83-e077-3e11-a13857a299de@propaas.com>
<86wpf3qu08.fsf@jerry.enova.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Jerry Sievers <gsievers19@comcast.net> writes:
> ProPAAS DBA <dba@propaas.com> writes:
>> pg_toast.pg_toast_16784
>> How do I find the primary table for this toast table?
> Find the pg_class row with reltoastrelid = $oid-of-toast-table.
After you've done that a couple of times, you'll notice that the numeric
part of the toast table's name is the OID of its parent, so really you
just need to do
select '16784'::regclass;
Confirming the reltoastrelid link is a good idea though.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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: tgl@sss.pgh.pa.us, gsievers19@comcast.net, dba@propaas.com
Subject: Re: how to find a pg_toast table's primary table
In-Reply-To: <6624.1481672778@sss.pgh.pa.us>
* 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