Missing TOAST table for pg_class

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Missing TOAST table for pg_class
Дата
Msg-id CAFcNs+rYdnHdi5EsJFm_q1rrKse=swb=O9Fx=4dKPht6ed5EOw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Missing TOAST table for pg_class
Список pgsql-hackers
Hi all,

I know it has been discussed before [1] but one of our customers complained about something weird on one of their multi-tenancy databases (thousands of schemas with a lot of objects inside and one user by schema).

So when I checked the problem is because the missing TOAST for pg_class, and is easy to break it by just:

fabrizio=# create table foo (id int);
CREATE TABLE
fabrizio=# do                        
$$
begin
    for i in 1..2500
    loop
        execute 'create user u' || i;
        execute 'grant all on foo to u' || i;
    end loop;
end;
$$;
ERROR:  row is too big: size 8168, maximum size 8160
CONTEXT:  SQL statement "grant all on foo to u2445"
PL/pgSQL function inline_code_block line 6 at EXECUTE

Attached patch adds the TOAST to pg_class, and let's open again the discussion around it.

Regards,


--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "tsunakawa.takay@fujitsu.com"
Дата:
Сообщение: RE: Transactions involving multiple postgres foreign servers, take 2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Lift line-length limit for pg_service.conf