toast tables on system catalogs

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: toast tables on system catalogs
Date: 2011-03-01 21:51:58
Message-ID: 1299015851-sup-6188@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_class
where oid in (
select attrelid
from pg_attribute
where (attname like '%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(at)alvh(dot)no-ip(dot)org>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2011-03-01 21:55:41 Re: wrapping up this CommitFest (was Re: knngist - 0.8)
Previous Message Peter Eisentraut 2011-03-01 21:44:16 Re: Porting PostgreSQL to DragonFly BSD