Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-09 Thread Michael Paquier
On Wed, May 10, 2017 at 12:00 AM, Peter Eisentraut wrote: > On 5/9/17 04:54, Petr Jelinek wrote: >>> I think that it would be nice to fix that even before beta, so >>> attached is a patch to add --no-subscriptions to pg_dump, pg_dumpall >>> and pg_restore. >> >>

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-09 Thread Peter Eisentraut
On 5/9/17 04:54, Petr Jelinek wrote: >> I think that it would be nice to fix that even before beta, so >> attached is a patch to add --no-subscriptions to pg_dump, pg_dumpall >> and pg_restore. > > Looks okay to me, it's simple enough patch. Committed, thanks. (There was some inconsistent

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-09 Thread Petr Jelinek
On 09/05/17 07:24, Michael Paquier wrote: > On Sat, May 6, 2017 at 12:01 AM, Peter Eisentraut > wrote: >> On 5/2/17 21:44, Noah Misch wrote: I wonder if we should have an --no-subscriptions option, now that they are dumped by default, just like we have

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-08 Thread Michael Paquier
On Sat, May 6, 2017 at 12:01 AM, Peter Eisentraut wrote: > On 5/2/17 21:44, Noah Misch wrote: >>> I wonder if we should have an --no-subscriptions option, now that they >>> are dumped by default, just like we have --no-blobs, --no-owner, >>> --no-password,

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-08 Thread Peter Eisentraut
On 5/6/17 14:50, Noah Misch wrote: >> I consider this item low priority and don't plan to work on it before >> all the other open items under logical replication are addressed. >> >> (Here, working on it would include thinking further about whether it is >> necessary at all or what alternatives

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-08 Thread Noah Misch
On Sat, May 06, 2017 at 11:50:16AM -0700, Noah Misch wrote: > On Fri, May 05, 2017 at 11:01:57AM -0400, Peter Eisentraut wrote: > > On 5/2/17 21:44, Noah Misch wrote: > > >> I wonder if we should have an --no-subscriptions option, now that they > > >> are dumped by default, just like we have

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-06 Thread Noah Misch
On Fri, May 05, 2017 at 11:01:57AM -0400, Peter Eisentraut wrote: > On 5/2/17 21:44, Noah Misch wrote: > >> I wonder if we should have an --no-subscriptions option, now that they > >> are dumped by default, just like we have --no-blobs, --no-owner, > >> --no-password, --no-privileges, --no-acl,

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-05 Thread Peter Eisentraut
On 5/2/17 21:44, Noah Misch wrote: >> I wonder if we should have an --no-subscriptions option, now that they >> are dumped by default, just like we have --no-blobs, --no-owner, >> --no-password, --no-privileges, --no-acl, --no-tablespaces, and >> --no-security-labels. It seems like there is

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-02 Thread Noah Misch
On Thu, Apr 13, 2017 at 12:11:30PM -0400, Robert Haas wrote: > On Thu, Apr 13, 2017 at 12:05 PM, Peter Eisentraut > wrote: > > On 4/12/17 18:31, Peter Eisentraut wrote: > >> On 4/11/17 23:41, Noah Misch wrote: > >>> On Tue, Apr 11, 2017 at 11:21:24PM -0400, Peter

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-17 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 4/13/17 12:11, Robert Haas wrote: > > I wonder if we should have an --no-subscriptions option, now that they > > are dumped by default, just like we have --no-blobs, --no-owner, > > --no-password, --no-privileges, --no-acl,

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-13 Thread Peter Eisentraut
On 4/13/17 12:11, Robert Haas wrote: > I wonder if we should have an --no-subscriptions option, now that they > are dumped by default, just like we have --no-blobs, --no-owner, > --no-password, --no-privileges, --no-acl, --no-tablespaces, and > --no-security-labels. It seems like there is

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-13 Thread Petr Jelinek
On 13/04/17 18:11, Robert Haas wrote: > On Thu, Apr 13, 2017 at 12:05 PM, Peter Eisentraut > wrote: >> On 4/12/17 18:31, Peter Eisentraut wrote: >>> On 4/11/17 23:41, Noah Misch wrote: On Tue, Apr 11, 2017 at 11:21:24PM -0400, Peter Eisentraut wrote: >

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-13 Thread Robert Haas
On Thu, Apr 13, 2017 at 12:05 PM, Peter Eisentraut wrote: > On 4/12/17 18:31, Peter Eisentraut wrote: >> On 4/11/17 23:41, Noah Misch wrote: >>> On Tue, Apr 11, 2017 at 11:21:24PM -0400, Peter Eisentraut wrote: On 4/9/17 22:16, Noah Misch wrote: >

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-13 Thread Peter Eisentraut
On 4/12/17 18:31, Peter Eisentraut wrote: > On 4/11/17 23:41, Noah Misch wrote: >> On Tue, Apr 11, 2017 at 11:21:24PM -0400, Peter Eisentraut wrote: >>> On 4/9/17 22:16, Noah Misch wrote: [Action required within three days. This is a generic notification.] >>> >>> Patches have been posted.

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-12 Thread Peter Eisentraut
On 4/11/17 22:16, Peter Eisentraut wrote: > On 4/10/17 13:58, Peter Eisentraut wrote: >> Proposal: Dump subscriptions if running as superuser. If not, check if >> there are subscriptions and warn about that. Remove current pg_dump >> --include-subscriptions option. > > Patch for this part. And

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-12 Thread Peter Eisentraut
On 4/11/17 23:41, Noah Misch wrote: > On Tue, Apr 11, 2017 at 11:21:24PM -0400, Peter Eisentraut wrote: >> On 4/9/17 22:16, Noah Misch wrote: >>> [Action required within three days. This is a generic notification.] >> >> Patches have been posted. Discussion is still going on a bit. > > By what

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Noah Misch
On Tue, Apr 11, 2017 at 11:21:24PM -0400, Peter Eisentraut wrote: > On 4/9/17 22:16, Noah Misch wrote: > > [Action required within three days. This is a generic notification.] > > Patches have been posted. Discussion is still going on a bit. By what day should the community look for your next

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Peter Eisentraut
On 4/9/17 22:16, Noah Misch wrote: > [Action required within three days. This is a generic notification.] Patches have been posted. Discussion is still going on a bit. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training &

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Peter Eisentraut
On 4/10/17 20:55, Stephen Frost wrote: >> Proposal: Dump all subscriptions in DISABLED state. Remove current >> pg_dump --no-subscription-connect option. > I like this idea in general, I'm just not sure if it's the right answer > when we're talking about pg_upgrade. At a minimum, if we go with

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Peter Eisentraut
On 4/10/17 13:58, Peter Eisentraut wrote: > Proposal: Dump subscriptions if running as superuser. If not, check if > there are subscriptions and warn about that. Remove current pg_dump > --include-subscriptions option. Patch for this part. -- Peter Eisentraut

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Robert Haas
On Tue, Apr 11, 2017 at 10:13 AM, Stephen Frost wrote: >> I totally agree, which is why I was rather surprised when you >> vigorously objected to my attempts to replace the remainder of the >> main tree's superuser checks that completely block execution of >> certain SQL

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Robert Haas
On Tue, Apr 11, 2017 at 9:48 AM, Robert Haas wrote: > On Mon, Apr 10, 2017 at 1:58 PM, Peter Eisentraut > wrote: >> OK, we need to come to a conclusion here. To summarize: >> >> Problem 1: pg_subscription.subconninfo can only be read by

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Apr 10, 2017 at 10:08 PM, Stephen Frost wrote: > > Generally speaking, we should be trying to move away from superuser-only > > anything, not introducing more of it. > > I totally agree, which is why I was rather

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-11 Thread Robert Haas
On Mon, Apr 10, 2017 at 10:08 PM, Stephen Frost wrote: > Generally speaking, we should be trying to move away from superuser-only > anything, not introducing more of it. I totally agree, which is why I was rather surprised when you vigorously objected to my attempts to

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-10 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 4/10/17 20:55, Stephen Frost wrote: > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > >> Problem 1: pg_subscription.subconninfo can only be read by superuser. > >> So non-superusers cannot dump

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-10 Thread Peter Eisentraut
On 4/10/17 20:55, Stephen Frost wrote: > Peter, > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> Problem 1: pg_subscription.subconninfo can only be read by superuser. >> So non-superusers cannot dump subscriptions. > > I'm not particularly happy with this. Why? How?

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-10 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > Problem 1: pg_subscription.subconninfo can only be read by superuser. > So non-superusers cannot dump subscriptions. I'm not particularly happy with this. > Precedent is pg_user_mapping. In that case, we just omit the >

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-10 Thread Peter Eisentraut
OK, we need to come to a conclusion here. To summarize: Problem 1: pg_subscription.subconninfo can only be read by superuser. So non-superusers cannot dump subscriptions. Precedent is pg_user_mapping. In that case, we just omit the user-mapping options if we're not a superuser. Pretty

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-09 Thread Noah Misch
On Fri, Feb 17, 2017 at 09:33:32AM -0500, Stephen Frost wrote: > Peter, > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > > On 2/16/17 21:04, Stephen Frost wrote: > > > I'm not entirely sure about the reasoning behind requiring a flag to > > > include subscriptions in pg_dump

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-02-19 Thread Robert Haas
On Fri, Feb 17, 2017 at 7:34 AM, Stephen Frost wrote: > I'm not entirely sure about the reasoning behind requiring a flag to > include subscriptions in pg_dump output, as the documentation doesn't > actually provide one, but if we are going to require that, shouldn't >

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-02-17 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 2/17/17 09:33, Stephen Frost wrote: > >> One reason is that pg_subscription is only readable by a superuser, so > >> we can't even dump them unless we're superuser. > > Sure, but that's true of roles and other things.. On a

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-02-17 Thread Peter Eisentraut
On 2/17/17 09:33, Stephen Frost wrote: >> One reason is that pg_subscription is only readable by a superuser, so >> we can't even dump them unless we're superuser. > Sure, but that's true of roles and other things.. On a system with RLS, > likely only the database superuser can actually read

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-02-17 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 2/16/17 21:04, Stephen Frost wrote: > > I'm not entirely sure about the reasoning behind requiring a flag to > > include subscriptions in pg_dump output, > > One reason is that pg_subscription is only readable by a

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-02-17 Thread Peter Eisentraut
On 2/16/17 21:04, Stephen Frost wrote: > I'm not entirely sure about the reasoning behind requiring a flag to > include subscriptions in pg_dump output, One reason is that pg_subscription is only readable by a superuser, so we can't even dump them unless we're superuser. Also, restoring a

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-02-16 Thread Stephen Frost
Peter, * Stephen Frost (sfr...@snowman.net) wrote: > * Peter Eisentraut (pete...@gmx.net) wrote: > > Logical replication > > > > - Add PUBLICATION catalogs and DDL > > - Add SUBSCRIPTION catalog and DDL > > - Define logical replication protocol and output plugin > > - Add logical replication

[HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-02-16 Thread Stephen Frost
Peter, * Peter Eisentraut (pete...@gmx.net) wrote: > Logical replication > > - Add PUBLICATION catalogs and DDL > - Add SUBSCRIPTION catalog and DDL > - Define logical replication protocol and output plugin > - Add logical replication workers I'm not entirely sure about the reasoning behind