From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eric Anderson Vianet SAO <eric@vianet-express.com.br>
Cc: pgsql-sql@postgresql.org
Subject: Re: discover a toast table name
Date: Tue, 27 May 2003 10:20:12 -0400
Message-ID: <15000.1054045212@sss.pgh.pa.us> (raw)
In-Reply-To: <00e001c32453$2f8f45b0$0701a8c0@netterm>
References: <001101c31fb8$ebdb30c0$0701a8c0@netterm>
<3ECE195A.7060209@Yahoo.com>
<004901c3212e$8919fda0$0701a8c0@netterm>
<3ECFE017.7060800@Yahoo.com>
<00e001c32453$2f8f45b0$0701a8c0@netterm>
"Eric Anderson Vianet SAO" <eric@vianet-express.com.br> writes:
> How can I discover which toast table referenced to a phisic table?
Look at the base table's pg_class row. reltoastrelid is the OID of the
corresponding toast table. So, for example, if I thought "text_tbl" had
such a problem:
regression=# select relname from pg_class where
regression-# oid = (select reltoastrelid from pg_class where relname = 'text_tbl');
relname
-----------------
pg_toast_163219
(1 row)
regression=# reindex table pg_toast.pg_toast_163219;
REINDEX
regression=#
regards, tom lane
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, eric@vianet-express.com.br
Subject: Re: discover a toast table name
In-Reply-To: <15000.1054045212@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