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 1hpbky-00061f-3P for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 17:05:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpbkw-0005ik-9x for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 17:05:46 +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 1hpbkv-0005dr-Vi for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 17:05:46 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpbko-0001nk-OT for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 17:05:45 +0000 Received: by mail-qk1-x741.google.com with SMTP id d15so29090729qkl.4 for ; Mon, 22 Jul 2019 10:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=83fQRMQ3rwJ2k1W7LSJf32UHTaGqRo9ooFo60A9aS1c=; b=o4q1h4xpac6zkdbu8pboKSncqGDAOmOc+ZUa10ExOkXwvDhQl5bsY2giCVixqzl2Vj LVE9RwqO8iwMVDbKW9rzygRGRo9/SEEiaG555SArEt8T7bOTRvRiGUoodcuOKeNNl6LQ JPaP+AhTroNnt1bsZ/WMjsSeHWxw8dcdVft0oMI3GXrVDXGI0rCC1426RvuMybCnYd+F 4m6Xw9243Iv09tz3Vx24MovZq5GsLCqVNI4W0Hg28Rdx+d/dK+vjS4NCpYRD7IK9zaFR vCKpxdoxMtNI3IzG/VuLuYaOCo48B/xqPiWm5TqQlSdVvgmACO1RdGD5SgNa7ue6EXOf a0Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=83fQRMQ3rwJ2k1W7LSJf32UHTaGqRo9ooFo60A9aS1c=; b=WvPYmdRQG6aITxpfqpm8wy4GjKHLIi4MvennJRgtn/DFsFoKX7TBx98Ajj/yKHu377 aBJ1pXFPbbWnIEe4DKNrRgezhFUFKg1JbMCeNvtV1eUQYanSmpCX3NU1sSBmYJokuZuQ 7T+s2RF3tcmp/VQTnKjkAFNyozKJ2aN33H21ZYCMJMJB4Jj5eF7WKO6oHYOI+SjHMHAJ AIEw9l5oIEvRSjxXELhqUj/jjdAYSwbXCbupHLJyuhzDCqGvWHn2R2eQkBizpBcLZiVN ho5+0WAzNCuLgJn3I6I0uc2nnJk8eNvZ/ekeXatKxWntfbgpSihm1QmA/Ll4+iTk2CT6 uctQ== X-Gm-Message-State: APjAAAVzRm9r0lvnXItfcDyuI5sg+kRIRTUkTz4o0PgwEoFsdYD1Yg63 /tHGIvR8Vzt5cQmNWhYLpqBj6w== X-Google-Smtp-Source: APXvYqyS0nkzcsDBS39Oq2pNpb/F6mhc0uzVZ8nZH7LyAYsSgPQM/iF4AlUhKlXrbhxO7bwEeCzWFQ== X-Received: by 2002:a37:4c53:: with SMTP id z80mr48146384qka.276.1563815136353; Mon, 22 Jul 2019 10:05:36 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.202]) by smtp.gmail.com with ESMTPSA id w24sm24691807qtb.35.2019.07.22.10.05.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 10:05:35 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id DA7A9120D50; Mon, 22 Jul 2019 13:05:32 -0400 (-04) Date: Mon, 22 Jul 2019 13:05:32 -0400 From: Alvaro Herrera To: Tom Lane 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 Message-ID: <20190722170532.GA26019@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <27884.1563811033@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jul-22, Tom Lane wrote: > 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. Fair enough. List has gotten quite sophisticated now, so I understand the concern. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services