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 1m3boK-00071Y-Cv for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 10:08:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3boJ-0000Wx-7O for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 10:08:11 +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 1m3boI-0000Wa-Rf for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 10:08:10 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m3boF-0003kE-Ld for pgsql-hackers@postgresql.org; Wed, 14 Jul 2021 10:08:09 +0000 Received: by mail-ej1-x62d.google.com with SMTP id go30so2421585ejc.8 for ; Wed, 14 Jul 2021 03:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ilF+8cG+eIW4paxv+Jr5nrosbGqz8F6fJJpeZuAUfow=; b=0bt2PLQ56ZY0pm2b+lqiXuteDbs8eNnEqqVP0Ku0gm3uceevhYPZVlfDT9B4VAnwN9 kAJtQpL/nQcay1R8jIiBKbB6EJi35fPiUTAWp3ruSgDqPox0q1YZoX+s+aHdDILIv5aG 6PNADqgufM67pzH4Pbl2z7ZPIhmdhvoD9ZqHf0f8phI198RLBzRGl1lJGwSXGuPO94vI Ax+GsW6wtGA/+8dMstNg2HNMK9ZUMON9yJUY841Q7jZDGOIYdRyJPY/o94jP8lq5D0+K YSX9N7KLKEQXKK6ACh9kdQ/wuTGE/YX7Qc6bW2ZRHr4uFvUpUAy54VbquOnnQKrq736W dEeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ilF+8cG+eIW4paxv+Jr5nrosbGqz8F6fJJpeZuAUfow=; b=GZ/fEeMJks2aVsMDDR9xYf4zMdq+IjBD0kNUChMxX3j8cAhJfQHn5IYr408dDE279a 9hHcLN2GgAcbiSPKsX02VRKdnv0QjvSWoQSm29uJEonuBej9o9WYVl/hGMy4YpJdbXE5 hojg9fAgU/QGnT4dC2JW8nAmIkcFdqOqkzVhw3gbpPjl6Dw/FytltGtv5khGzVyNeIz6 GBdEnIh354xv4RIBV+5xjlLKk3Xk75vrMKV3fthbMV6mQSX/OqcbdK3aa9e09EcglVBn eEPcLJkFiZ0Tt/N3mocXPcJX5rYWNofV7lENk9bPklBzjxZ9BVRfZw64olCZixZZsg3r OV7w== X-Gm-Message-State: AOAM532sMOCl1eG62zUqTBYYISOoeS+FSrpjOVRn8AjY32PYg5eQKTwu fELFHSFDp7FTYtcf8b+uSLYK62p0UOwKXeqCmXzfxa7T3XwZEQPwOB/XsRfY2bztRtj6j/jW3xP ojsH2NkO2bFSDp0+p8mTDJOuLypJBID+TB/yL1WEAa36Nm56dRcN2D3gPrdRmH0OEqBUzPZ+k7j gGRAxBDSR08wmYv2m330XR55NemjWEYjL6ZvQK X-Google-Smtp-Source: ABdhPJx8WxWPo4ZxU2nswuQ6QRMnhQJ6EFTNGNaoAOvPsO4m20YoDsVcsbVzLdBifSjVB2Kx3QzULA== X-Received: by 2002:a17:907:75d2:: with SMTP id jl18mr11229342ejc.238.1626257286277; Wed, 14 Jul 2021 03:08:06 -0700 (PDT) Received: from [10.137.0.18] (ip-86-49-254-183.net.upcbroadband.cz. [86.49.254.183]) by smtp.gmail.com with ESMTPSA id n16sm579032ejc.121.2021.07.14.03.08.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jul 2021 03:08:05 -0700 (PDT) Subject: Re: proposal: possibility to read dumped table's name from file To: Stephen Frost , Alvaro Herrera Cc: Daniel Gustafsson , Dean Rasheed , Justin Pryzby , Pavel Stehule , PostgreSQL Hackers , Surafel Temesgen , Tom Lane , vignesh C References: <20210713223217.GQ20766@tamriel.snowman.net> <202107132300.6n66nwlaok7q@alvherre.pgsql> <20210714001835.GV20766@tamriel.snowman.net> From: Tomas Vondra Message-ID: Date: Wed, 14 Jul 2021 12:08:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210714001835.GV20766@tamriel.snowman.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/14/21 2:18 AM, Stephen Frost wrote: > Greetings, > > * Alvaro Herrera (alvherre@2ndquadrant.com) wrote: >> On 2021-Jul-13, Stephen Frost wrote: >>> The simplest possible format isn't going to work with all the different >>> pg_dump options and it still isn't going to be 'simple' since it needs >>> to work with the flexibility that we have in what we support for object >>> names, >> >> That's fine. If people want a mechanism that allows changing the other >> pg_dump options that are not related to object filtering, they can >> implement a configuration file for that. > > It's been said multiple times that people *do* want that and that they > want it to all be part of this one file, and specifically that they > don't want to end up with a file structure that actively works against > allowing other options to be added to it. > I have no problem believing some people want to be able to specify pg_dump parameters in a file, similarly to IMPDP/EXPDP parameter files etc. That seems useful, but I doubt they considered the case with many filter rules ... which is what "my people" want. Not sure how keeping the filter rules in a separate file (which I assume is what you mean by "file structure"), with a format tailored for filter rules, works *actively* against adding options to the "main" config. I'm not buying the argument that keeping some of the stuff in a separate file is an issue - plenty of established tools do that, the concept of "including" a config is not a radical new thing, and I don't expect we'd have many options supported by a file. In any case, I think user input is important, but ultimately it's up to us to reconcile the conflicting requirements coming from various users and come up with a reasonable compromise design. >>> I don't know that the options that I suggested previously would >>> definitely work or not but they at least would allow other projects like >>> pgAdmin to leverage existing code for parsing and generating these >>> config files. >> >> Keep in mind that this patch is not intended to help pgAdmin >> specifically. It would be great if pgAdmin uses the functionality >> implemented here, but if they decide not to, that's not terrible. They >> have survived decades without a pg_dump configuration file; they still >> can. > > The adding of a config file for pg_dump should specifically be looking > at pgAdmin as the exact use-case for having such a capability. > >> There are several votes in this thread for pg_dump to gain functionality >> to filter objects based on a simple specification -- particularly one >> that can be written using shell pipelines. This patch gives it. > > And several votes for having a config file that supports, or at least > can support in the future, the various options which pg_dump supports- > and active voices against having a new file format that doesn't allow > for that. > IMHO the whole "problem" here stems from the question whether there should be a single universal pg_dump config file, containing everything including the filter rules. I'm of the opinion it's better to keep the filter rules separate, mainly because: 1) simplicity - Options (key/value) and filter rules (with more internal structure) seem quite different, and mixing them in the same file will just make the format more complex. 2) flexibility - Keeping the filter rules in a separate file makes it easier to reuse the same set of rules with different pg_dump configs, specified in (much smaller) config files. So in principle, the "main" config could use e.g. TOML or whatever we find most suitable for this type of key/value config file (or we could just use the same format as for postgresql.conf et al). And the filter rules could use something as simple as CSV (yes, I know it's not great, but there's plenty of parsers, it handles multi-line strings etc.). >>> I'm not completely against inventing something new, but I'd really >>> prefer that we at least try to make something existing work first >>> before inventing something new that everyone is going to have to deal >>> with. >> >> That was discussed upthread and led nowhere. > > You're right- no one followed up on that. Instead, one group continues > to push for 'simple' and to just accept what's been proposed, while > another group counters that we should be looking at the broader design > question and work towards a solution which will work for us down the > road, and not just right now. > I have quite thick skin, but I have to admit I rather dislike how this paints the people arguing for simplicity. IMO simplicity is a perfectly legitimate (and desirable) design feature, and simpler solutions often fare better in the long run. Yes, we need to look at the broader design, no doubt about that. > One thing remains clear- there's no consensus here. > True. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company