I'd like to suggest a small addition to the TOAST overview in the
8.4 comprehensive manual, Chapter 53.2 TOAST.
This is my first doc patch for postgres, so if this is not
appropriate, please advise. I spent almost an hour trying to figure
out how to go from the TOAST table id to the owning table name...
finally got help on #postgresql. Thought I'd document it for other
sys admins new to PostgreSQL.
Or is this something that would be better to go into the PostgreSQL Wiki?
To find the parent table given a TOAST table, which has a name like
pg_toast_12513885, cast the OID of the toast table to "regclass".
For example: Given "monkeys" table which spills over to pg_toast_12513885:
"regclass" stands for registered "class". Per RhodiumToad on #postgresql,
for reasons too complicated to explain, "class" is used to mean "relation".
Reference: "casting a table's OID to regclass is handy for symbolic
display of a numeric OID"
pgsql-docs by date
|Next:||From: Aleksey Tsalolikhin||Date: 2010-12-23 02:05:22|
|Subject: Re: Addition to TOAST documentation in 8.4 comprehensive manual|
|Previous:||From: Leslie S Satenstein||Date: 2010-12-22 23:30:16|