pgsql: Get rid of any toast table when converting a table to a view.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Get rid of any toast table when converting a table to a view.
Дата
Msg-id E1UCIuk-0003ml-02@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Get rid of any toast table when converting a table to a view.

Also make sure other fields of the view's pg_class entry are appropriate
for a view; it shouldn't have relfrozenxid set for instance.

This ancient omission isn't believed to have any serious consequences in
versions 8.4-9.2, so no backpatch.  But let's fix it before it does bite
us in some serious way.  It's just luck that the case doesn't cause
problems for autovacuum.  (It did cause problems in 8.3, but that's out
of support.)

Andres Freund

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b15a6da29217b14f02895af1d9271e84415a91ae

Modified Files
--------------
src/backend/rewrite/rewriteDefine.c  |   98 ++++++++++++++++++++++++++++++----
src/backend/rewrite/rewriteSupport.c |   11 +---
src/include/rewrite/rewriteSupport.h |    3 +-
src/test/regress/expected/rules.out  |    7 +++
src/test/regress/sql/rules.sql       |    3 +
5 files changed, 101 insertions(+), 21 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix SQL function execution to be safe with long-lived FmgrInfos.
Следующее
От: Kevin Grittner
Дата:
Сообщение: pgsql: Add a materialized view relations.