Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mi0K9-0006hd-GU for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Nov 2021 20:24:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mi0K8-0005V1-E0 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Nov 2021 20:24:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mi0K8-0005Ur-1S for pgsql-hackers@lists.postgresql.org; Tue, 02 Nov 2021 20:24:00 +0000 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mi0K3-0001e9-NB for pgsql-hackers@postgresql.org; Tue, 02 Nov 2021 20:23:58 +0000 Received: by mail-il1-x131.google.com with SMTP id l8so321206ilv.3 for ; Tue, 02 Nov 2021 13:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ecFL9wWZto9sG1T9qmE5t4iDmpffulC5pJo3yULLSfw=; b=VmPxzlqOdrGDRDvn5P0D/Ko4vnvnJXSiJi+VUpV0S2n7S875LWOO7BfIqsqsDpxtWb 7M2RrBJhjcUDBkZPtWcJLicrXJ/FKd/TByQ/bGiVU8opBKaiRX2f6yP+FJkQFVQmJLId q1rGvdUe0VXp0cbssJvuUTGElws17Qoz1nWhASF8zY21hJGUe8uxO4aJzBcOkADLXCBz Ew2ADsqTSPx7r9BUg5vVAVsLmFKZydKRy5mFSBGsAMW9MTlA7wT/zRzjH7PJN010XErV e+8teL58LJG/065KxTzdPnwCWQ/1jMNBLwgLBpTzUaBDpONKxQBMCfAZ6UtCQVdV0UUy KqKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ecFL9wWZto9sG1T9qmE5t4iDmpffulC5pJo3yULLSfw=; b=DEkMfTInWm/XwEsoehqtFWKpZdTbB3+h7R3EEXHpKBtH3wC5WKWyMSdQ5G0sefqwF1 Aw+LCujHZBUEbGZ7vG6tZ+6RBdPJ711JRDOIUw42Cx49znIE2IWado0N+PcDI+nWK+qr t88qGy+kpKU7wt4Zma2ySmObjZVBMFBanmo7Horm6OvQc0n4TG7HfJRC22fUYXcrkbGh NIYURgpUWLbPWNIi6dfmN86tn58khjk5Tk7Eb5KBVQOLAI4+GwImydXOYt96uP74Qfp/ 5J/PfFd0urZ+BFRaQ8Dh0cWjY2iKN3eTd8GXM6ns5aPNDyPsKpWaP3gjAH4b1va5f++U opVQ== X-Gm-Message-State: AOAM532nZQWpoMEuYsIheCjkAnvMJPXmzfg7kiEt8FCKAoBILXYGAVFL 4rMDIdHgyFnEuK0aJ2d+fBqLSg== X-Google-Smtp-Source: ABdhPJwLK15wZTBNbyMtuZNsccYn9EQbskaqnjzpmB+lBey7CVdzetcyDx1eAXKqvah4bIg4P7hIdg== X-Received: by 2002:a92:4453:: with SMTP id a19mr27805846ilm.233.1635884635048; Tue, 02 Nov 2021 13:23:55 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id d5sm49501iow.46.2021.11.02.13.23.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Nov 2021 13:23:54 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id D2D0780071F; Tue, 2 Nov 2021 15:23:53 -0500 (CDT) Date: Tue, 2 Nov 2021 15:23:53 -0500 From: Justin Pryzby To: Melanie Plageman Cc: pgsql-hackers@postgresql.org, Andres Freund , Alvaro Herrera Subject: Re: make tuplestore helper function Message-ID: <20211102202353.GG17618@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Several places have a conditional value for the first argument (randomAccess), but your patch changes the behavior to a constant "true". I didn't review the patch beyond that. > @@ -740,18 +724,14 @@ pg_prepared_statement(PG_FUNCTION_ARGS) > - tupstore = > - tuplestore_begin_heap(rsinfo->allowedModes & SFRM_Materialize_Random, > - false, work_mem); > @@ -2701,42 +2701,13 @@ pg_hba_file_rules(PG_FUNCTION_ARGS) > - tuple_store = > - tuplestore_begin_heap(rsi->allowedModes & SFRM_Materialize_Random, > - false, work_mem); > @@ -4799,31 +4797,8 @@ pg_timezone_names(PG_FUNCTION_ARGS) > - randomAccess = (rsinfo->allowedModes & SFRM_Materialize_Random) != 0; > - tupstore = tuplestore_begin_heap(randomAccess, false, work_mem); > @@ -575,38 +575,12 @@ pg_ls_dir_1arg(PG_FUNCTION_ARGS) > - randomAccess = (rsinfo->allowedModes & SFRM_Materialize_Random) != 0; > - tupstore = tuplestore_begin_heap(randomAccess, false, work_mem); > @@ -1170,17 +1154,12 @@ pg_cursor(PG_FUNCTION_ARGS) > - tupstore = > - tuplestore_begin_heap(rsinfo->allowedModes & SFRM_Materialize_Random, > - false, work_mem); > +++ b/src/backend/utils/fmgr/funcapi.c > + tupstore = tuplestore_begin_heap(true, false, maxKBytes); -- Justin