mirror of
https://github.com/postgres/postgres.git
synced 2025-09-11 00:12:06 +03:00
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.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.62.2.1 2003/01/08 19:41:57 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.62.2.2 2003/03/23 21:55:14 tgl Exp $
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
* index_open - open an index relation by relation OID
|
* index_open - open an index relation by relation OID
|
||||||
@@ -415,7 +415,12 @@ index_getnext(IndexScanDesc scan, ScanDirection direction)
|
|||||||
*
|
*
|
||||||
* Note that we hold the pin on the single tuple's buffer throughout
|
* Note that we hold the pin on the single tuple's buffer throughout
|
||||||
* the scan once we are in this state.
|
* 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 (scan->keys_are_unique && scan->got_tuple)
|
||||||
{
|
{
|
||||||
if (ScanDirectionIsForward(direction))
|
if (ScanDirectionIsForward(direction))
|
||||||
@@ -433,6 +438,7 @@ index_getnext(IndexScanDesc scan, ScanDirection direction)
|
|||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Release any previously held pin */
|
/* Release any previously held pin */
|
||||||
if (BufferIsValid(scan->xs_cbuf))
|
if (BufferIsValid(scan->xs_cbuf))
|
||||||
|
Reference in New Issue
Block a user