Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpagn-0002l3-VZ for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:57:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpagl-0006Mk-1U for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:57:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpagk-0006Md-Ow for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:57:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpagh-00015m-Nk for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:57:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6MFvDNt027885; Mon, 22 Jul 2019 11:57:13 -0400 From: Tom Lane To: Alvaro Herrera cc: Julien Rouhaud , Michael Paquier , Peter Eisentraut , Thomas Munro , Daniel Verite , PostgreSQL Hackers , Kevin Grittner Subject: Re: Add parallelism and glibc dependent only options to reindexdb In-reply-to: <20190722153301.GA23276@alvherre.pgsql> References: <20190722153301.GA23276@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 22 Jul 2019 11:33:01 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27883.1563811033.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 22 Jul 2019 11:57:13 -0400 Message-ID: <27884.1563811033@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2019-Jul-22, Julien Rouhaud wrote: >> On Mon, Jul 22, 2019 at 5:11 PM Alvaro Herrera wrote: >>> Can we use List for this instead? >> Isn't that for backend code only? > Well, we already have palloc() on the frontend side, and list.c doesn't > have any elog()/ereport(), so it should be possible to use it ... I do > see that it uses MemoryContextAlloc() in a few places. Maybe we can > just #define that to palloc()? I'm not happy about either the idea of pulling all of list.c into frontend programs, or restricting it to be frontend-safe. That's very fundamental infrastructure and I don't want it laboring under such a restriction. Furthermore, List usage generally leaks memory like mad (cf nearby list_concat discussion) which doesn't seem like something we want for frontend code. regards, tom lane