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 1hpZyt-0000gD-1a for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:12:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpZyr-0001Fy-Tf for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:12:01 +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 1hpZyr-0001Fr-Ha for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:12:01 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpZyo-0000dj-9r for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:12:01 +0000 Received: by mail-qt1-x844.google.com with SMTP id y26so38874105qto.4 for ; Mon, 22 Jul 2019 08:11:55 -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=Lgf3jAbw1slAsClgzrLXjJGt9Wo2ezZXgALaEYTRBC8=; b=Uddd8EyNR80J+eXlz+AH2O6QFEF9I657jRpVgQfdRShY9TToAJirbNS0tw2Ha1Lyqk 2Jz8d5mVkdbTeepLIQ3EFf7PSxJEBH5cKRnQtZLnEBs7yl/CpXmq6bFy98qQqz7mHAAa qDq/6rfGwCn8jy2EIvoII2SsDouiQynuSGMNMwDlkIRbTnPeOyFc1gLOFVSaDBGVsDzR ez1Z9k02FhAC/llozBulVIMoyjtaNpEe/guwFXfLyuPdjl25YqrVUVnZXAMOHy4YAIet v5Ly6nez7RN1dchn5tOcPF4v6AojVuV69EGWp9gHrVbA0VV4w2NcwvV3r+yvLW65BEeM 4+ng== 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=Lgf3jAbw1slAsClgzrLXjJGt9Wo2ezZXgALaEYTRBC8=; b=ou7x8YbLtAOwp3SEcJmT8Y2VMXOkQt7nJjpYxGnp12xfUpvM/mvmWbm6wudnfyYyMG lc3qBC1AMtG6GXLfgtmdIjN8sEq7ZIircSwvTQ9+ztGm9qvxwbf+l10fD3reCSkMt+cz AT6L6iAYJG+wJRWCPTgKJE3J9nYLwpNJklDP5QRQs/S0eVB4PIipe6nmimmDH/HfRRW4 rnOkGGrOYIjROBxlfuJBKidviPCcFpwrYEvLIs9PVQot3qFyzMLVV/oTMQGQmeQzj9wJ EgcJSbMCTwIPx7e/JNQD4wUG1ucYMNVpWc/i+gpaQ7Zu/9SGSsFscWgKr4fDSN5ziHxq Yz5Q== X-Gm-Message-State: APjAAAXmolCS8jUtrvWJRo6SjiecgLbgI7Eo2ywKNb3nN7wlotC0eW6G 9QLCLjIpNvPOvRup0GhLrAxHSw== X-Google-Smtp-Source: APXvYqzDnuZeRU9Fh/CXyFCP9NrxA9hjmczdv1HN4PNQpL852BUgb2VZoBV7UWnBkx/owvnD1RA2Yw== X-Received: by 2002:ac8:428f:: with SMTP id o15mr47984348qtl.210.1563808314439; Mon, 22 Jul 2019 08:11:54 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.202]) by smtp.gmail.com with ESMTPSA id y194sm19766013qkb.111.2019.07.22.08.11.53 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 08:11:53 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id E2BBB12082F; Mon, 22 Jul 2019 11:11:50 -0400 (-04) Date: Mon, 22 Jul 2019 11:11:50 -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: <20190722151150.GA22364@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 6:11 AM Michael Paquier wrote: > > simple_string_list_append(&tables, optarg); > > + tbl_count++; > > break; > > The number of items in a simple list is not counted, and vacuumdb does > > the same thing to count objects. What do you think about extending > > simple lists to track the number of items stored? > > 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? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services