mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Be more tense about not creating tuplestores with randomAccess = true unless
backwards scan could actually happen. In particular, pass a flag to materialize-mode SRFs that tells them whether they need to require random access. In passing, also suppress unneeded backward-scan overhead for a Portal's holdStore tuplestore. Per my proposal about reducing I/O costs for tuplestores.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/**********************************************************************
|
||||
* plperl.c - perl as a procedural language for PostgreSQL
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.140 2008/10/09 17:24:05 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.141 2008/10/29 00:00:39 tgl Exp $
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
@ -1922,7 +1922,8 @@ plperl_return_next(SV *sv)
|
||||
|
||||
current_call_data->ret_tdesc = CreateTupleDescCopy(tupdesc);
|
||||
current_call_data->tuple_store =
|
||||
tuplestore_begin_heap(true, false, work_mem);
|
||||
tuplestore_begin_heap(rsi->allowedModes & SFRM_Materialize_Random,
|
||||
false, work_mem);
|
||||
if (prodesc->fn_retistuple)
|
||||
{
|
||||
current_call_data->attinmeta =
|
||||
|
Reference in New Issue
Block a user