From 6534444d191a56afba36e0e1b58e9d18fc28a578 Mon Sep 17 00:00:00 2001 From: Jan Wieck Date: Wed, 5 Jul 2000 16:17:43 +0000 Subject: Changed TOAST relations to have relkind RELKIND_TOASTVALUE. Special handling of TOAST relations during VACUUM. TOAST relations are vacuumed while the lock on the master table is still active. The ANALYZE flag doesn't propagate to their vacuuming because the toaster access routines allways use index access ignoring stats, so why compute them at all. Protection of TOAST relations against normal INSERT/UPDATE/DELETE while offering SELECT for debugging purposes. Jan --- src/backend/executor/execMain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend/executor/execMain.c') diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index c707315081d..6f161d95c0f 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -27,7 +27,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.120 2000/07/05 13:22:25 wieck Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.121 2000/07/05 16:17:43 wieck Exp $ * *------------------------------------------------------------------------- */ @@ -720,6 +720,10 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate) elog(ERROR, "You can't change sequence relation %s", RelationGetRelationName(resultRelationDesc)); + if (resultRelationDesc->rd_rel->relkind == RELKIND_TOASTVALUE) + elog(ERROR, "You can't change toast relation %s", + RelationGetRelationName(resultRelationDesc)); + resultRelationInfo = makeNode(RelationInfo); resultRelationInfo->ri_RangeTableIndex = resultRelationIndex; resultRelationInfo->ri_RelationDesc = resultRelationDesc; -- cgit v1.2.3