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 1hpaJL-0001pB-IF for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:33:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpaJK-0002i9-BT for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:33:10 +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 1hpaJK-0002i2-2k for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:33:10 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpaJH-0000rK-4s for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:33:09 +0000 Received: by mail-qk1-x742.google.com with SMTP id s22so28928405qkj.12 for ; Mon, 22 Jul 2019 08:33:06 -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=JVyIjWgZvpu7ZNOBuUqSx144fRu6iTMHyJnHgsQeoaY=; b=li/e7024jvEQg49JC9jZxKwqNiez2h1TOn3F14nuj9/InRN078WjaJUvfg+ZnSRdq/ jk5m26LuD53hA2igwABqrZYDg0suHz732yzLR2/XKqYC/1UP3lEKiidqnTvKzAuBEsTa BwcDrAfZ3r+kscJrT9Ok1mnWzy+hNS3/eftLMnukgmnIk1ZrTUxREfBGlz+jxWROtUvP PJeQYRr9r/jdyecVHNNmm9LNiHsM5b9k1IRaFLhl6RoUxlS/yK9nVKpy8maL5hGfZ63x Uhyglkv1neAVeRZ606GNzA9NWnHEBRXgV5zlgkSoSF7pQuoE7WGuU8pQx2Hbr3ZRll+r hsjg== 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=JVyIjWgZvpu7ZNOBuUqSx144fRu6iTMHyJnHgsQeoaY=; b=PHxrSk8+0Myu92in6kGD+EVcs9yqeZX4PtBrOl3+T7pkoqvzMiWHc/RzQ0diTlReX5 7vhVeJtDCS1opnT+eb0Y/oLKK51lo9dPk9m5H1pG3476vcLTmeRXKdiTFR2PJ9aWP30A 9KVhW4Bqg/ciUv+C6WSdflZrF7nM/JA07GtLDhU8az0LMC6O/C135V/ypO7YlhnQMNtA 9i7kEBwFRDGDHhYg2pqdfmmQJ9IGhFoKG8SEkiBALJpiVEVumUlooZp4LfZ8CaWF4dF7 xf7fQx4zBg+CHb6YU3gpXPoJGVPunrz0X8WybJEkU3LM1XWuk1XfEzUEKuDHi5UooQTe 7G4w== X-Gm-Message-State: APjAAAXYs5dou3c8Jwq6rqmxaasj/7eTsedqIY+NLzypTLLz6mc8XTvE HFAbWrSbCYd+A3He0ZsfV/nl2A== X-Google-Smtp-Source: APXvYqyVnI5fFHMvZOZxHXm9bcJfbLvOdRBxO/LIxOeZhin/77bnQCOwlaLuj7HCNdvfFQqJakklCA== X-Received: by 2002:a05:620a:1497:: with SMTP id w23mr46322501qkj.49.1563809585756; Mon, 22 Jul 2019 08:33:05 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.202]) by smtp.gmail.com with ESMTPSA id l19sm24286413qtb.6.2019.07.22.08.33.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 08:33:05 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id C6A1D12082F; Mon, 22 Jul 2019 11:33:01 -0400 (-04) Date: Mon, 22 Jul 2019 11:33:01 -0400 From: Alvaro Herrera To: Julien Rouhaud Cc: Michael Paquier , Peter Eisentraut , Thomas Munro , Daniel Verite , Tom Lane , PostgreSQL Hackers , Kevin Grittner Subject: Re: Add parallelism and glibc dependent only options to reindexdb Message-ID: <20190722153301.GA23276@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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, Julien Rouhaud wrote: > On Mon, Jul 22, 2019 at 5:11 PM Alvaro Herrera wrote: > > > > > I considered this, but it would require to adapt all code that declare > > > SimpleStringList stack variable (vacuumdb.c, clusterdb.c, > > > createuser.c, pg_dumpall.c and pg_dump.c), so it looked like too much > > > trouble to avoid 2 local variables here and 1 in vacuumdb.c. I don't > > > have a strong opinion here, so I can go for it if you prefer. > > > > 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()? (Maybe we can use the impulse to get rid of these "simple lists" altogether?) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services