aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-09-24 00:25:33 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-09-24 00:25:33 +0000
commite812458b273be00bde34fb74991ab4a99c24ab30 (patch)
treee7460ae5c0344782f6f6068399f6f7eab5be96f6 /src/backend/executor/execMain.c
parentad791c1d140af97d93ee98883e2c45413d6f9836 (diff)
downloadpostgresql-e812458b273be00bde34fb74991ab4a99c24ab30.tar.gz
postgresql-e812458b273be00bde34fb74991ab4a99c24ab30.zip
Several changes here, not very related but touching some of the same files.
* Buffer refcount cleanup (per my "progress report" to pghackers, 9/22). * Add links to backend PROC structs to sinval's array of per-backend info, and use these links for routines that need to check the state of all backends (rather than the slow, complicated search of the ShmemIndex hashtable that was used before). Add databaseOID to PROC structs. * Use this to implement an interlock that prevents DESTROY DATABASE of a database containing running backends. (It's a little tricky to prevent a concurrently-starting backend from getting in there, since the new backend is not able to lock anything at the time it tries to look up its database in pg_database. My solution is to recheck that the DB is OK at the end of InitPostgres. It may not be a 100% solution, but it's a lot better than no interlock at all...) * In ALTER TABLE RENAME, flush buffers for the relation before doing the rename of the physical files, to ensure we don't get failures later from mdblindwrt(). * Update TRUNCATE patch so that it actually compiles against current sources :-(. You should do "make clean all" after pulling these changes.
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r--src/backend/executor/execMain.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 97dffe548f7..f07f8777a2f 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.94 1999/09/18 19:06:47 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.95 1999/09/24 00:24:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -130,16 +130,6 @@ ExecutorStart(QueryDesc *queryDesc, EState *estate)
queryDesc->plantree,
estate);
- /*
- * reset buffer refcount. the current refcounts are saved and will be
- * restored when ExecutorEnd is called
- *
- * this makes sure that when ExecutorRun's are called recursively as for
- * postquel functions, the buffers pinned by one ExecutorRun will not
- * be unpinned by another ExecutorRun.
- */
- BufferRefCountReset(estate->es_refcount);
-
return result;
}
@@ -385,10 +375,6 @@ ExecutorEnd(QueryDesc *queryDesc, EState *estate)
pfree(estate->es_param_exec_vals);
estate->es_param_exec_vals = NULL;
}
-
- /* restore saved refcounts. */
- BufferRefCountRestore(estate->es_refcount);
-
}
void
@@ -802,7 +788,7 @@ EndPlan(Plan *plan, EState *estate)
{
TupleTable tupleTable = (TupleTable) estate->es_tupleTable;
- ExecDestroyTupleTable(tupleTable, true); /* was missing last arg */
+ ExecDestroyTupleTable(tupleTable, true);
estate->es_tupleTable = NULL;
}
@@ -1678,7 +1664,6 @@ EvalPlanQual(EState *estate, Index rti, ItemPointer tid)
sizeof(ParamExecData));
epqstate->es_tupleTable =
ExecCreateTupleTable(estate->es_tupleTable->size);
- epqstate->es_refcount = estate->es_refcount;
/* ... rest */
newepq->plan = copyObject(estate->es_origPlan);
newepq->free = NULL;