pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
discover a toast table name
3+ messages / 2 participants
[nested] [flat]

* discover a toast table name
@ 2003-05-27 13:23  Eric Anderson Vianet SAO <eric@vianet-express.com.br>
  0 siblings, 1 reply; 3+ messages in thread

From: Eric Anderson Vianet SAO @ 2003-05-27 13:23 UTC (permalink / raw)
  To: pgsql-sql

How can I discover which toast table referenced to a phisic table?

example: table name tbdmovimento. how could i know the toast table name to
reindex it.

tnx.


Eric Anderson Martins Miranda
Net Admin @ Via Net SAO




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: discover a toast table name
@ 2003-05-27 14:20  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Eric Anderson Vianet SAO <eric@vianet-express.com.br>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2003-05-27 14:20 UTC (permalink / raw)
  To: Eric Anderson Vianet SAO <eric@vianet-express.com.br>; +Cc: pgsql-sql

"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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: discover a toast table name
@ 2003-05-27 15:34  Eric Anderson Vianet SAO <eric@vianet-express.com.br>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Eric Anderson Vianet SAO @ 2003-05-27 15:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

when i try that i´v got an error

ERROR: "pg_toast_26474986" is a system table. call REINDEX under standalone
postgres with -O -P options

so I kill postmaster and up it standalone.
but the reindex command doesn´t have options. and postmaster doesn´t have
these ones too.

tnx.

Eric Anderson Martins Miranda
Net Admin @ Via Net SAO
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Eric Anderson Vianet SAO" <eric@vianet-express.com.br>
Cc: <pgsql-sql@postgresql.org>
Sent: Tuesday, May 27, 2003 11:20 AM
Subject: Re: [SQL] discover a toast table name


> "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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-05-27 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-27 13:23 discover a toast table name Eric Anderson Vianet SAO <eric@vianet-express.com.br>
2003-05-27 14:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-05-27 15:34   ` Eric Anderson Vianet SAO <eric@vianet-express.com.br>

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