Re: [ADMIN] how to find a pg_toast table's primary table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [ADMIN] how to find a pg_toast table's primary table
Дата
Msg-id 6624.1481672778@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [ADMIN] how to find a pg_toast table's primary table  (Jerry Sievers <gsievers19@comcast.net>)
Список pgsql-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


В списке pgsql-admin по дате отправления:

Предыдущее
От: Jorge Torralba
Дата:
Сообщение: Re: [ADMIN] how to find a pg_toast table's primary table
Следующее
От: koffi BADOH
Дата:
Сообщение: [ADMIN] postgres account disabled . version 9.2