pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
need a bit of help
3+ messages / 2 participants
[nested] [flat]

* need a bit of help
@ 2006-04-26 22:21  Warren Little <warren.little@meridiascapital.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Warren Little @ 2006-04-26 22:21 UTC (permalink / raw)
  To: pgsql-admin

Hello,
got myself in a pickle with the database running out of space.

I have a question regarding pg_toast tables and their relationships to
the parent tables.

If I run the following query
select * from pg_class where 
reltoastrelid like '%944' or reltoastidxid like '%944'

I receive a single row:
pg_toast_62130940,99,62130943,39934,0,62130942,0,7602767,3.04112e
+07,0,62130944,t,f,t,3,0,0,0,0,0,f,t,f,f,

which appears to be the pg_toast entry.  Shouldn't there be a pg_class
whose reltoastrelid equals the reltoastidxid of the pg_toast instance

I'm trying to determine if I have some tuples that are not being
vacuumed.

thanks

-- 
Warren Little
Chief Technology Officer
Meridias Capital Inc
1018 W Atherton Dr
Salt Lake City, UT 84123
ph: 866.369.7763



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

* Re: need a bit of help
@ 2006-04-26 23:22  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Warren Little <warren.little@meridiascapital.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2006-04-26 23:22 UTC (permalink / raw)
  To: Warren Little <warren.little@meridiascapital.com>; +Cc: pgsql-admin

Warren Little <warren.little@meridiascapital.com> writes:
> which appears to be the pg_toast entry.  Shouldn't there be a pg_class
> whose reltoastrelid equals the reltoastidxid of the pg_toast instance

No.  The deal is

regular table's reltoastrelid points to OID of its toast table

toast table's reltoastidxid points to OID of its index

There's no "back links".

			regards, tom lane



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

* Re: need a bit of help
@ 2006-04-26 23:46  Warren Little <warren.little@meridiascapital.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Warren Little @ 2006-04-26 23:46 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

ok

thanks

On Wed, 2006-04-26 at 19:22 -0400, Tom Lane wrote:
> Warren Little <warren.little@meridiascapital.com> writes:
> > which appears to be the pg_toast entry.  Shouldn't there be a pg_class
> > whose reltoastrelid equals the reltoastidxid of the pg_toast instance
> 
> No.  The deal is
> 
> regular table's reltoastrelid points to OID of its toast table
> 
> toast table's reltoastidxid points to OID of its index
> 
> There's no "back links".
> 
> 			regards, tom lane
-- 
Warren Little
Chief Technology Officer
Meridias Capital Inc
1018 W Atherton Dr
Salt Lake City, UT 84123
ph: 866.369.7763



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


end of thread, other threads:[~2006-04-26 23:46 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26 22:21 need a bit of help Warren Little <warren.little@meridiascapital.com>
2006-04-26 23:22 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-04-26 23:46   ` Warren Little <warren.little@meridiascapital.com>

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