Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbCH8-0004v5-Ci for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Feb 2017 20:22:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cbCH7-0003w8-FU for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Feb 2017 20:22:05 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cbCFh-0002Mm-Fo for pgsql-hackers@postgresql.org; Tue, 07 Feb 2017 20:20:37 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbCFd-00034H-Fv for pgsql-hackers@postgresql.org; Tue, 07 Feb 2017 20:20:36 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 8C2E95F794; Tue, 7 Feb 2017 15:19:32 -0500 (EST) Date: Tue, 7 Feb 2017 15:19:32 -0500 From: Stephen Frost To: Peter Eisentraut Cc: pgsql-hackers@postgresql.org Subject: PUBLICATIONS and pg_dump Message-ID: <20170207201932.GH9812@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JDR258SQUlEnAH93" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 22:13:36 up 207 days, 4:37, 8 users, load average: 0.16, 0.15, 0.14 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --JDR258SQUlEnAH93 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter, * Peter Eisentraut (peter_e@gmx.net) wrote: > Logical replication >=20 > - Add PUBLICATION catalogs and DDL > - Add SUBSCRIPTION catalog and DDL > - Define logical replication protocol and output plugin > - Add logical replication workers I think we need to have a bit more discussion regarding where publications (and maybe subscriptions... not sure on that though) fit when it comes to pg_dump. In particular, I'm trying to clean up the pg_dump TAP tests and am finding things I wouldn't have expected. For example, publications appear to be included in pretty much every pg_dump output, no matter if a specific schema or even table was explicitly called for, or if that publication or subscription was explicitly associated with that table. The example I'm playing with is: CREATE PUBLICATION pub2 WITH (PUBLISH INSERT, PUBLISH UPDATE, PUBLISH DELETE); and a simple: pg_dump -n public -t t1 Will end up including the CREATE PUBLICATION command. In fact, I'm not entirely sure how to have it not included in pg_dump's output. I understand that this is a bit complicated, but I would have thought we'd do something similar to what is done for DEFAULT PRIVILEGES, where we include the "global" default privileges when we are doing a dump of "everything", but if we're dumping a specific schema then we only include the default privileges directly associated with that schema. Perhaps we need to include publications which are specific to a particular table, but the current logic of, essentially, "always include all publications" does not seem to make a lot of sense to me. I'm happy to be corrected if I've grossly misunderstood something here, of course. Thanks! Stephen --JDR258SQUlEnAH93 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYmivUAAoJEO1sijiDR2RV3F0QAICXapBLm/bTp9w0zt3q3/Wo hiHfS6JSeJOYIrHwHwvjK8WN8YXJ/6+8xJS2YWQwFqFdeWZHb8Fg6qevKs4AtHUD JR17FAUaapK/ZQIoZkx6nw9/YiWedG3LzJQgJea2pSlmwsgp8kYnjcbzfDLAVKht xDPKy4d/RKmOl/TvqoDOaHUSsJba/Gc/0l4A/h4yrKPHs5hxoSCMCHmUoGIwRr+B 2bqnUtCUx2AA66BXzfp+QFXNHTWg7lDTAutV0xVwPZ0FqXqxP3bxiVeP5hk+mZ/a v0UJO45Zt7N+vyuK9UV6UDBopJ3kkKKQVlQM0Wp4tupWa3oW6mdxRsEnAgJkEJal 6Rz1f+0JqL+Ig8vGZoNNdqVC6ClZcKhXW4HQyaP0hnHNh6JSMU541Dn3Fj3uX6gg fP/n3CzFQHcEsi6JBXzoN9BQepelhsdr3Oh+m+/cuOd+ynm8VP28WDPjXfdmluzh r5NJxf2xYSBBo9ko47+2CyFwGOICaxN4aQAQhr0KUvzqzqI8e1/31bQob2v+KC66 a+fJt+6GiIrpsGFt6qSecpjbfXP/pVNADBYtPlOnUZ9C6mxi7GMD4lCA1d6c3/gh k5GyjaINfKZlgXgdnwOkFtWl//LzZOWNMfdoxAbQjtTN3YLeN8ngG3j3OvMc5Ydt QZRZEXozsq4nnsJWV1f7 =MR/K -----END PGP SIGNATURE----- --JDR258SQUlEnAH93--