toast tables on system catalogs - Mailing list pgsql-hackers

From Alvaro Herrera
Subject toast tables on system catalogs
Date
Msg-id 1299015851-sup-6188@alvh.no-ip.org
Whole thread Raw
Responses Re: toast tables on system catalogs
List pgsql-hackers
Hi,

Someone on IRC recently noticed that you can't grant USAGE privileges on
a table to a large number of roles.  (My experiment says 2466 works,
2467 doesn't).

Of course, this is wrong and all that.  I wrote a blog article about
this:
http://www.commandprompt.com/blogs/alvaro_herrera/2011/03/grant_schema_usage_to_2500_users_no_can_do/

The reason for this is that pg_namespace doesn't have a toast table; and
neither do other 10 catalogs that have "acl" columns:

pg_attribute
pg_default_acl
pg_largeobject_metadata
pg_pltemplate
pg_tablespace
pg_class
pg_foreign_data_wrapper
pg_namespace
pg_foreign_server
pg_user_mapping
pg_language

select relname, reltoastrelid from pg_classwhere oid in (       select attrelid         from pg_attribute        where
(attnamelike '%acl' and atttypid = 'aclitem[]'::regtype) or              (attname like '%options' and atttypid =
'text[]'::regtype))     and relkind = 'r';
 


Strangely, we made pg_database have a toast table, and the only reason
for this is datacl.  Should we create toast tables for the remaining
catalogs?

-- 
Álvaro Herrera <alvherre@alvh.no-ip.org>


pgsql-hackers by date:

Previous
From: Maxim Boguk
Date:
Subject: Re: Re: [ADMIN] PD_ALL_VISIBLE flag was incorrectly set happend during repeatable vacuum
Next
From: Jaime Casanova
Date:
Subject: Re: wrapping up this CommitFest (was Re: knngist - 0.8)