Re: Is it good to have toast table for information schema table?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is it good to have toast table for information schema table?
Date: 2014-04-23 00:42:57
Message-ID: 53570C91.9000802@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/22/2014 04:58 PM, AI Rumman wrote:
> Hi,
>
> Is it good to have toast table for information schema table? I am using
> Postgresql 8.4 and current state is:
>
> *select datname, datfrozenxid from pg_database; *
> datname | datfrozenxid
> -----------+--------------
> template1 | 1462730397
> template0 | 1462741467
> postgres | 1562754912
> jangles | 1459615432
> (4 rows)
> *
> *
> *
> *
> *select * from pg_class where relfrozenxid = 1459615432;*
> relname | reltoastidxid | relhasindex | relfrozenxid
> ----------------+---------------+-------------+--------------
> pg_toast_11447 | 11451 | t | 1459615432
> (1 row)
> *
> *
> *
> *
> *select 11447::regclass; *
> regclass
> ---------------------------------
> information_schema.sql_features
> (1 row)
>
> Please advice.

A TOAST table is used whenever the actual table has variable length
fields that meet certain criteria:

http://www.postgresql.org/docs/9.3/static/storage-toast.html

information_schema.sql_features schema is:

test=# \d information_schema.sql_features
Table "information_schema.sql_features"
Column | Type | Modifiers
------------------+-----------------------------------+-----------
feature_id | information_schema.character_data |
feature_name | information_schema.character_data |
sub_feature_id | information_schema.character_data |
sub_feature_name | information_schema.character_data |
is_supported | information_schema.yes_or_no |
is_verified_by | information_schema.character_data |
comments | information_schema.character_data |

From here you see character_data is not fixed length:

http://www.postgresql.org/docs/9.3/static/infoschema-datatypes.html

so a TOAST table is not out of order.

I see it on my database also.

>
> Thanks.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-04-23 00:47:32 Re: [GENERAL] aggregate returning anyarray and 'cannot determine result data type'
Previous Message AI Rumman 2014-04-22 23:58:07 Is it good to have toast table for information schema table?