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 1ki0xy-0001DO-Qt for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Nov 2020 20:00:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ki0xx-0005LX-FV for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Nov 2020 20:00:37 +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 1ki0xx-0005LE-8i for pgsql-hackers@lists.postgresql.org; Wed, 25 Nov 2020 20:00:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ki0xv-0007oV-7i for pgsql-hackers@postgresql.org; Wed, 25 Nov 2020 20:00:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0APK0W8b502642; Wed, 25 Nov 2020 15:00:32 -0500 From: Tom Lane To: Pavel Stehule cc: Dean Rasheed , Justin Pryzby , Stephen Frost , Surafel Temesgen , Alvaro Herrera , vignesh C , PostgreSQL Hackers , Daniel Gustafsson Subject: Re: proposal: possibility to read dumped table's name from file In-reply-to: References: <20200903200842.GA11952@alvherre.pgsql> <832697.1599178532@sss.pgh.pa.us> <20201110200904.GU16415@tamriel.snowman.net> <20201117215321.GF24784@telsasoft.com> Comments: In-reply-to Pavel Stehule message dated "Wed, 25 Nov 2020 20:29:00 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <502640.1606334432.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 25 Nov 2020 15:00:32 -0500 Message-ID: <502641.1606334432@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pavel Stehule writes: > st 25. 11. 2020 v 19:25 odesílatel Dean Rasheed > napsal: >> I agree that being able to configure pg_dump via a config file would >> be very useful, but the syntax proposed here feels much more like a >> hacked-up syntax designed to meet this one use case, rather than a >> good general-purpose design that can be easily extended. > But I don't understand why? What is a use case? What is a benefit against > command line, or libpq variables? And why should config files be better as > a solution for limited length of command line, when I need to dump > thousands of tables exactly specified? Because next week somebody will want to dump thousands of functions selected by name, or schemas selected by name, etc etc. I agree with the position that we don't want a single-purpose solution. The idea that the syntax should match the command line switch syntax seems reasonable, though I'm not wedded to it. (One thing to consider is how painful will it be for people to quote table names containing funny characters, for instance. On the command line, we largely depend on the shell's quoting behavior to solve that, but we'd not have that infrastructure when reading from a file.) > What are the benefits of supporting multiple formats? Yeah, that part of Dean's sketch seemed like overkill to me too. I wasn't very excited about multiple switch files either, though depending on how the implementation is done, that could be simple enough to be in the might-as-well category. One other point that I'm wondering about is that there's really no value in doing anything here until you get to some thousands of table names; as long as the list fits in the shell's command line length limit, you might as well just make a shell script file. Does pg_dump really have sane performance for that situation, or are we soon going to be fielding requests to make it not be O(N^2) in the number of listed tables? regards, tom lane