Skip to content

Commit 4844adc

Browse files
committed
Fixes;
Postgres is not able to cluster a relation on which an rtree index is defined. Postmaster gives the following error message: Too Large Allocation Request("!(0 < (size) && (size) <= (0xfffffff)):size=0 [0x0]", File:"/export/home/postgres/src/backend/utils/mmgr/mcxt.c", Line: 220) !(0 <(size) && (size) <= (0xfffffff)) (0) [No such file or directory] Submitted by: Dirk Koeser <koeser@informatik.uni-rostock.de>
1 parent bde3455 commit 4844adc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/backend/access/rtree/rtscan.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.1.1.1 1996/07/09 06:21:13 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.2 1996/08/15 07:30:22 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -122,15 +122,13 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
122122
} else {
123123
/* initialize opaque data */
124124
p = (RTreeScanOpaque) palloc(sizeof(RTreeScanOpaqueData));
125-
p->s_internalKey =
126-
(ScanKey) palloc(sizeof(ScanKeyData) * s->numberOfKeys);
127125
p->s_stack = p->s_markstk = (RTSTACK *) NULL;
128126
p->s_internalNKey = s->numberOfKeys;
129127
p->s_flags = 0x0;
130-
for (i = 0; i < s->numberOfKeys; i++)
131-
p->s_internalKey[i].sk_argument = s->keyData[i].sk_argument;
132128
s->opaque = p;
133129
if (s->numberOfKeys > 0) {
130+
p->s_internalKey =
131+
(ScanKey) palloc(sizeof(ScanKeyData) * s->numberOfKeys);
134132

135133
/*
136134
* Scans on internal pages use different operators than they
@@ -140,6 +138,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
140138
*/
141139

142140
for (i = 0; i < s->numberOfKeys; i++) {
141+
p->s_internalKey[i].sk_argument = s->keyData[i].sk_argument;
143142
internal_proc = RTMapOperator(s->relation,
144143
s->keyData[i].sk_attno,
145144
s->keyData[i].sk_procedure);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy