From: Tom Lane Date: Sun, 23 Mar 2003 21:55:14 +0000 (+0000) Subject: Band-aid patch for Shraibman's 'out of free buffers' bug: disable the X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=a88e148f65dc4805819b87b9ed43fb95169f076a;p=users%2Fbernd%2Fpostgres.git Band-aid patch for Shraibman's 'out of free buffers' bug: disable the keys_are_unique optimization introduced in 7.3. A better fix will appear in 7.4, but I think back-patching it is too risky for the stable branch. --- diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 85a001663f..3eab63e743 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -415,7 +415,12 @@ index_getnext(IndexScanDesc scan, ScanDirection direction) * * Note that we hold the pin on the single tuple's buffer throughout * the scan once we are in this state. + * + * XXX disabled for 7.3.3 because it results in intra-query buffer leak + * when a multi-index indexscan is done. Full fix seems too risky to + * backpatch. */ +#ifdef NOT_USED if (scan->keys_are_unique && scan->got_tuple) { if (ScanDirectionIsForward(direction)) @@ -433,6 +438,7 @@ index_getnext(IndexScanDesc scan, ScanDirection direction) else return NULL; } +#endif /* Release any previously held pin */ if (BufferIsValid(scan->xs_cbuf))