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 1jiPLN-0000Fw-6k for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2020 21:30:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jiPLM-0000dt-3X for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2020 21:30:08 +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 1jiPLL-0000Zf-P7 for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2020 21:30:07 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jiPLE-00065e-Ux for pgsql-hackers@postgresql.org; Mon, 08 Jun 2020 21:30:06 +0000 Received: by mail-io1-xd30.google.com with SMTP id p20so20382388iop.11 for ; Mon, 08 Jun 2020 14:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=GU1BlDEEof2Y6FzW6jUZn5sXrj946tQGE6kcGrtLtmw=; b=OZmMxwbKxKhPOrg3H44+6YFU22rKA48ZsMpPd7Bj32j4qQ/5zr9ZBi5uWgxU7TbLah xpPx/cWBPLxbJtJjY4uMHD4eDNnxGb+/3dGchGcys3U4ZaCd5sS9UWWgqO00nxAuyfWA I5K1UqXho8l1gNKmzX73r0KEmI9Gcdm+JgywjjLhCAgklqQWtDY3PyB/LfbuEcW8cFa7 SdF9bsyKmInf6h8tH/mAWx2YeNuyH4RurOEaiEEvyk1la1Lo9XCNHK8yXHbRD3tYu7gp TChxqmVB9p7GO89CJooUf+kbNoFdLptLQL9tq/KJZORVCPEadPVCbxlNflDWKgfyuO1Y 2cHA== 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:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=GU1BlDEEof2Y6FzW6jUZn5sXrj946tQGE6kcGrtLtmw=; b=FqUD5OTy9L1xg7mpuGDq8K/CFz+cwotWJm+9+USzVGlZgNZGZSS9NCTw4K8hgl0/EA egLfUWBNT7oRo6ypBRG8P10D6/IC8OLoqFBDHs8u9fEXbFZKfJdD0SpDlcKcHInc5jZN nXzvlObwQmTMJFeeGm8IFwNkmekV7621fBOCOzS1Y1MzfMr8cEWXYHKIuCr+vd4bPwA1 HLYelwRb+grbsc1Tia8ZqEM7lnXhsYvDbN/E++1lzK4BAKXhLYr0sIslpnD9RUH/pCF9 zkv4Y7nSMXtsz+Y/9u+dl318BDAtRvW/yWdrIrhSsDrMgPnuW8SMVP4Ka70/Au/g23SS /O6A== X-Gm-Message-State: AOAM5339w3XceeYywxVimJwqIxtNxoA0iDWQfxHT7aLRvo8Oe1URh86N Tp1OPSPOYRv1vJ0JYATEWla2Snu8UPKeiQ== X-Google-Smtp-Source: ABdhPJyiNbP5flzlRr5ZeQ3PTWEe4UWBAzTaLjon9LSy/nPp5C8/WP/h9iRxrKO4R6CMmv9dJ2sg8w== X-Received: by 2002:a6b:8d44:: with SMTP id p65mr23829691iod.24.1591651799833; Mon, 08 Jun 2020 14:29:59 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id r19sm6426599ioj.12.2020.06.08.14.29.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jun 2020 14:29:58 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id B0FDD800121; Mon, 8 Jun 2020 16:29:57 -0500 (CDT) Date: Mon, 8 Jun 2020 16:29:57 -0500 From: Justin Pryzby To: Pavel Stehule Cc: pgsql-hackers@postgresql.org Subject: Re: proposal: possibility to read dumped table's name from file Message-ID: <20200608212957.GB22473@telsasoft.com> References: <20200529182514.GL17850@telsasoft.com> 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 Mon, Jun 08, 2020 at 07:18:49PM +0200, Pavel Stehule wrote: > pá 29. 5. 2020 v 20:25 odesílatel Justin Pryzby napsal: > > > On Fri, May 29, 2020 at 04:21:00PM +0200, Pavel Stehule wrote: > > > one my customer has to specify dumped tables name by name. After years and > > > increasing database size and table numbers he has problem with too short > > > command line. He need to read the list of tables from file (or from stdin). > > > > +1 - we would use this. > > > > We put a regex (actually a pg_dump pattern) of tables to skip (timeseries > > partitions which are older than a few days and which are also dumped once not > > expected to change, and typically not redumped). We're nowhere near the > > execve() limit, but it'd be nice if the command was primarily a list of options > > and not a long regex. > > > > Please also support reading from file for --exclude-table=pattern. > > > > I'm drawing a parallel between this and rsync --include/--exclude and > > --filter. > > > > We'd be implementing a new --filter, which might have similar syntax to rsync > > (which I always forget). > > I implemented support for all "repeated" pg_dump options. > > I invite any help with doc. There is just very raw text > > + Do not dump data of tables spefified in file. *specified I still wonder if a better syntax would use a unified --filter option, whose argument would allow including/excluding any type of object: +[tn] include (t)table/(n)namespace/... -[tn] exclude (t)table/(n)namespace/... In the past, I looked for a way to exclude extended stats objects, and ended up using a separate schema. An "extensible" syntax might be better (although reading a file of just patterns has the advantage that the function can just be called once for each option for each type of object). -- Justin