From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Get rid of any toast table when converting a table to a view. |
Date: | 2013-03-04 00:05:58 |
Message-ID: | E1UCIuk-0003ml-02@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-03-04 00:25:13 | pgsql: Add a materialized view relations. |
Previous Message | Tom Lane | 2013-03-03 23:39:08 | Re: Materialized views WIP patch |