diff options
| author | Tom Lane | 2005-12-02 20:03:42 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-12-02 20:03:42 +0000 |
| commit | d780f07ac1ea97e2d3cf906cc1c9d59d6b21c5e2 (patch) | |
| tree | e13c3013e4ede366298875eeb77197a07f7c4b54 /src/include | |
| parent | 5ab25988753ff495f3fd0b54ef00ba80d0d2808c (diff) | |
Adjust scan plan nodes to avoid getting an extra AccessShareLock on a
relation if it's already been locked by execMain.c as either a result
relation or a FOR UPDATE/SHARE relation. This avoids an extra trip to
the shared lock manager state. Per my suggestion yesterday.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/executor/executor.h | 5 | ||||
| -rw-r--r-- | src/include/nodes/execnodes.h | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 39c76c60aa5..f1d4e37c419 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.121 2005/11/23 20:27:58 tgl Exp $ + * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.122 2005/12/02 20:03:42 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -230,6 +230,9 @@ extern void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc, bool shouldFree); extern void ExecAssignScanTypeFromOuterPlan(ScanState *scanstate); +extern Relation ExecOpenScanRelation(EState *estate, Index scanrelid); +extern void ExecCloseScanRelation(Relation scanrel); + extern void ExecOpenIndices(ResultRelInfo *resultRelInfo); extern void ExecCloseIndices(ResultRelInfo *resultRelInfo); extern void ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid, diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 7371f950070..062985aacf3 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.145 2005/11/28 23:46:03 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.146 2005/12/02 20:03:42 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -346,6 +346,15 @@ typedef struct EState } EState; +/* es_rowMarks is a list of these structs: */ +typedef struct ExecRowMark +{ + Relation relation; /* opened and RowShareLock'd relation */ + Index rti; /* its range table index */ + char resname[32]; /* name for its ctid junk attribute */ +} ExecRowMark; + + /* ---------------------------------------------------------------- * Tuple Hash Tables * |
