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.
*
* 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))
else
return NULL;
}
+#endif
/* Release any previously held pin */
if (BufferIsValid(scan->xs_cbuf))