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 1m2FCK-0004iA-Oo for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Jul 2021 15:47:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m2FCJ-0007vS-NY for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Jul 2021 15:47:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2FCJ-0007tn-D2 for pgsql-hackers@lists.postgresql.org; Sat, 10 Jul 2021 15:47:19 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m2FCG-0006Tr-O0 for pgsql-hackers@postgresql.org; Sat, 10 Jul 2021 15:47:18 +0000 Received: by mail-ed1-x52a.google.com with SMTP id v1so18956810edt.6 for ; Sat, 10 Jul 2021 08:47:16 -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=TGGxK9pzHFEldXkQ0o0sECK1YRsQdUF6ukLvrAid5ms=; b=Xqs7FqXL1kiIWXaY+lxr2gUqSZM7aV/g+Z8er7dhef/NigEzH8nOuYhA1GDzPin3fe Ae3JAbDWbKJuo5DnXqk0/TWN2mGa2Tqr2e3q0M+ZpCta2Qzu6WofTr67kulVpBS0S2vk p1YOzmzWURbF4UsHU5MySq+VBLtXinLZAeSBNQRyAYWUlJfBOMo963eYTzPlnnL6RT5H yAb9dV2yKSP7UrGItGxSKPnDFcgYHA9mtzmsA2epjnN3esrJRz3Nca6X01V8njEUw2TE GDnyWNRHzzdqa9e7wfRCyFhm7Q9ET3cA+AF1TvqWLDwMUzMJX4J6q8MxH44jvsyuWe5u K9TQ== 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=TGGxK9pzHFEldXkQ0o0sECK1YRsQdUF6ukLvrAid5ms=; b=sNl9Fyo0wX+aEx4+/GU/JbiVYXggXScJIc5c1NDNJnLEyLLUipPc+1/Rln07A2JygN 42kItOmwaF+oolE48kTnf40gExLP1mOYIfNiDC/Bsj5CIh6tJLnTkumnj9QRRwkc8gnP qZz7CFR61tduhal/gjikLkiX3FqS0NlpJeaP520uY6BlFx4AKUV9tUktOybjw4IU4CHb whlq8aS9hI/T9W6f5SBjrotFpDO7MwDInFr5Qyog/q0VJwQ5EPSB3AtaNPuN/V+CU+j8 tECQrXkYo1VyeX2Eu3Xum8BA28Bbx+Hluwov+py88ZXkS2R+DwS6V2GXLSPLsIDHwZzw wGvA== X-Gm-Message-State: AOAM531gZjAUVzDc1P6uOhLcSTdmGAdnpLcgOQaNzvOv75z1NYE81wYP Kl/IrBpvxnNHVpi69b+NOARq/ndNGgmezcOTBP/kVnaeITKSXKy20l5FPQv/cFhMHaE5jE9Qf5t gZQXNVZ3jt6/H2HXutZqxkaPsiRW7X65DG9wA90abGE+cxaIDoLjWt26u748UksvZEoryORMMIZ i7ssd2eUe4P18X/oLPFbd5cuJjsnf4NugIj/pm X-Google-Smtp-Source: ABdhPJxd5CwRjHFh/sjaQY5iMrAktufD+leUvUAgH/Xy7g4OS905A289pKVWOl1XMbkusU+kF43zvA== X-Received: by 2002:aa7:c907:: with SMTP id b7mr18636423edt.148.1625932035629; Sat, 10 Jul 2021 08:47:15 -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 gx11sm3955783ejc.33.2021.07.10.08.47.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 10 Jul 2021 08:47:15 -0700 (PDT) Subject: Re: proposal: possibility to read dumped table's name from file To: Pavel Stehule , Justin Pryzby Cc: Tom Lane , Dean Rasheed , Stephen Frost , Surafel Temesgen , Alvaro Herrera , vignesh C , PostgreSQL Hackers , Daniel Gustafsson References: <20201110200904.GU16415@tamriel.snowman.net> <20201117215321.GF24784@telsasoft.com> <502641.1606334432@sss.pgh.pa.us> <20201128234945.GM24052@telsasoft.com> From: Tomas Vondra Message-ID: Date: Sat, 10 Jul 2021 17:47:12 +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: Content-Type: text/plain; charset=utf-8; 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 Hi, I started looking at the patch allowing to export just functions [1], and I got pointed to this patch as an alternative approach (to adding a separate filtering option for every possible object type). I'm familiar with the customer that inspired Pavel to start working on this, so I understand the use case he's trying to address - a flexible way to filter (include/exclude) large number of objects. IMHO it's a mistake to try to broaden the scope of the patch and require implementing some universal pg_dump config file, particularly if it requires "complex" structure or formats like JSON, TOML or whatever. Maybe that's worth doing, but in my mind it's orthogonal to what this patch aims (or aimed) to do - filtering objects using rules in a file, not on the command line. I believe it's much closer to .gitignore or rsync --filter than to a full config file. Even if we end up implementing the pg_dump config file, it'd be nice to keep the filter rules in a separate file and just reference that file from the config file. That also means I find it pointless to use an "advanced" format like JSON or TOML - I think the format should be as simple as possible. Yes, it has to support all valid identifiers, comments and so on. But I don't quite see a point in using JSON or similar "full" format. If a simple format is good enough for rsync or gitignore, why should we insist on using something more complex? OTOH I don't quite like the current approach of simply reading options from a file, because that requires adding new command-line options for each type of object we want to support. Which seems to contradict the idea of "general filter" method as mentioned in [1]. So if it was up to me, I'd go back to the original format or something close it. So something like this: [+-] OBJECT_TYPE_PATTERN OBJECT_NAME_PATTERN regards [1] https://commitfest.postgresql.org/33/3051/ -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company