[idea] a copied relkind in pg_attribute

Поиск
Список
Период
Сортировка
От KaiGai Kohei
Тема [idea] a copied relkind in pg_attribute
Дата
Msg-id 495221F0.7090101@kaigai.gr.jp
обсуждение исходный текст
Ответы Re: [idea] a copied relkind in pg_attribute  ("Jaime Casanova" <jcasanov@systemguards.com.ec>)
Список pgsql-hackers
It is an idea to improve the implementation of SE-PostgreSQL.
I need a copied relkind in pg_attribute, to help its decision
making.

When we access on pg_attribute via ALTER TABLE or DML statement
directly, SE-PostgreSQL checks privilleges for the fetched tuples.
If the relation pointed by its attrelid has RELKIND_RELATION,
the fetched tuple is a column, so db_column object class should
be applied. Otherwise, db_tuple object class should be applied,
because it is not a column, like an entity of composite type.

The current implementation need to lookup RELOID system cache to
identify the relkind of the relation, because pg_attribtue does
not have any information about "relkind". However, I also think
it is not an ideal implementation, even if its frequency is enough
small.

So, I have a plan to put a new member named as "attkind" into
pg_attribute to hold a copied value of its "relkind".
It enables to identify the attribute without looking up system
cache, so it is better than current one.
The pg_class.relkind is always unchanged, so it does not have
any problematical point.

Please comment anything, if you have alternative idea or opinions.
If reviewer intend to comment about the point, it can be fixed with
the above way.

Thanks,
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>


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

Предыдущее
От: "Fujii Masao"
Дата:
Сообщение: Re: Archiving control (a part of synch rep patches)
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Hot standby and b-tree killed items