Skip to content

Commit 1aebc36

Browse files
committed
First phase of memory management rewrite (see backend/utils/mmgr/README
for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.
1 parent b601c8d commit 1aebc36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2278
-3249
lines changed

doc/src/sgml/geqo.sgml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.9 2000/03/31 03:27:40 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.10 2000/06/28 03:30:53 tgl Exp $
33
Genetic Optimizer
44
-->
55

@@ -228,22 +228,6 @@ Improved cost size approximation of query plans since no longer
228228
<Sect2>
229229
<Title>Basic Improvements</Title>
230230

231-
<Sect3>
232-
<Title>Improve freeing of memory when query is already processed</Title>
233-
234-
<Para>
235-
With large <Command>join</Command> queries the computing time spent for the genetic query
236-
optimization seems to be a mere <Emphasis>fraction</Emphasis> of the time
237-
<ProductName>Postgres</ProductName>
238-
needs for freeing memory via routine <Function>MemoryContextFree</Function>,
239-
file <FileName>backend/utils/mmgr/mcxt.c</FileName>.
240-
Debugging showed that it get stucked in a loop of routine
241-
<Function>OrderedElemPop</Function>, file <FileName>backend/utils/mmgr/oset.c</FileName>.
242-
The same problems arise with long queries when using the normal
243-
<ProductName>Postgres</ProductName> query optimization algorithm.
244-
</para>
245-
</sect3>
246-
247231
<Sect3>
248232
<Title>Improve genetic algorithm parameter settings</Title>
249233

doc/src/sgml/ref/declare.sgml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.8 1999/12/30 22:58:10 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.9 2000/06/28 03:30:54 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -153,12 +153,13 @@ SELECT
153153

154154
<varlistentry>
155155
<term><computeroutput>
156-
NOTICE
157-
BlankPortalAssignName: portal "<replaceable class="parameter">cursorname</replaceable>" already exists
156+
NOTICE: Closing pre-existing portal "<replaceable class="parameter">cursorname</replaceable>"
158157
</computeroutput></term>
159158
<listitem>
160159
<para>
161-
This error occurs if <replaceable class="parameter">cursorname</replaceable> is already declared.
160+
This message is reported if the same cursor name was already declared
161+
in the current transaction block. The previous definition is
162+
discarded.
162163
</para>
163164
</listitem>
164165
</varlistentry>

src/backend/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#
3535
#
3636
# IDENTIFICATION
37-
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.55 2000/06/17 00:09:34 petere Exp $
37+
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.56 2000/06/28 03:30:57 tgl Exp $
3838
#
3939
#-------------------------------------------------------------------------
4040

@@ -237,8 +237,6 @@ install-headers: prebuildheaders $(SRCDIR)/include/config.h
237237
$(HEADERDIR)/utils/fmgroids.h
238238
$(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/palloc.h \
239239
$(HEADERDIR)/utils/palloc.h
240-
$(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/utils/mcxt.h \
241-
$(HEADERDIR)/utils/mcxt.h
242240
$(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/access/attnum.h \
243241
$(HEADERDIR)/access/attnum.h
244242
$(INSTALL) $(INSTLOPTS) $(SRCDIR)/include/executor/spi.h \

src/backend/access/heap/heapam.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.71 2000/06/15 04:09:34 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.72 2000/06/28 03:31:04 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1230,10 +1230,7 @@ heap_insert(Relation relation, HeapTuple tup)
12301230
* ----------------
12311231
*/
12321232
if (!OidIsValid(tup->t_data->t_oid))
1233-
{
12341233
tup->t_data->t_oid = newoid();
1235-
LastOidProcessed = tup->t_data->t_oid;
1236-
}
12371234
else
12381235
CheckMaxObjectId(tup->t_data->t_oid);
12391236

0 commit comments

Comments
 (0)