Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
Le 07/07/2015 14:55, Andres Freund a écrit : > On 2015-06-19 17:21:25 +0200, Cédric Villemain wrote: >>> To make slot usage in pg_receivexlog easier, should we add >>> --create-slot-if-not-exists? That'd mean you could run the same command >>> the first and later invocation. >> >> +1 (with a shorter name please, if you can find one... ) > > How about a seperate --if-not-exists modifier? Right now --create works > as an abbreviation for --create-slot, but --create-slot-if-not-exists > would break that. Having done a quick overview of other binaries provided by postgresql I realized that pg_receivexlog is distinct from other tools creating something at a sql level: for db, role and lang we have create and drop as distinct commands. Both dropdb and dropuser have a '--if-exists' (like in SQL) but have not for create operation. Maybe we should have used createslot/dropslot in the first place and use --if-exists --if-not-exists accordingly. Having all in one tool, adding one or both options looks good to me. The only alternative I see is more like "--force": return success even if the operation was not required (create or drop). -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
On 2015-06-19 17:21:25 +0200, Cédric Villemain wrote: > > To make slot usage in pg_receivexlog easier, should we add > > --create-slot-if-not-exists? That'd mean you could run the same command > > the first and later invocation. > > +1 (with a shorter name please, if you can find one... ) How about a seperate --if-not-exists modifier? Right now --create works as an abbreviation for --create-slot, but --create-slot-if-not-exists would break that. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
On Fri, Jun 19, 2015 at 12:00 PM, Cédric Villemain wrote: > +1 for it in 9.5 If we can do it soon, sure. But not in September. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
Le 19/06/2015 17:21, Andres Freund a écrit : > On 2015-06-19 11:19:23 -0400, Magnus Hagander wrote: >> On Fri, Jun 19, 2015 at 11:17 AM, Stephen Frost wrote: >> >>> * Andres Freund (and...@anarazel.de) wrote: To make slot usage in pg_receivexlog easier, should we add --create-slot-if-not-exists? That'd mean you could run the same command the first and later invocation. >>> >>> Yes, please. >> >> +1. > > Arguably we could do that for 9.5 - the whole slot stuff for receivexlog > is new, and this is just adjusting the API slightly. I won't fight much > for that opinion though. +1 for it in 9.5 -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
On 2015-06-19 11:19:23 -0400, Magnus Hagander wrote: > On Fri, Jun 19, 2015 at 11:17 AM, Stephen Frost wrote: > > > * Andres Freund (and...@anarazel.de) wrote: > > > To make slot usage in pg_receivexlog easier, should we add > > > --create-slot-if-not-exists? That'd mean you could run the same command > > > the first and later invocation. > > > > Yes, please. > > +1. Arguably we could do that for 9.5 - the whole slot stuff for receivexlog is new, and this is just adjusting the API slightly. I won't fight much for that opinion though. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
> To make slot usage in pg_receivexlog easier, should we add > --create-slot-if-not-exists? That'd mean you could run the same command > the first and later invocation. +1 (with a shorter name please, if you can find one... ) -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
On Fri, Jun 19, 2015 at 11:17 AM, Stephen Frost wrote: > * Andres Freund (and...@anarazel.de) wrote: > > To make slot usage in pg_receivexlog easier, should we add > > --create-slot-if-not-exists? That'd mean you could run the same command > > the first and later invocation. > > Yes, please. > +1. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Re: [HACKERS] pg_receivexlog --create-slot-if-not-exists
* Andres Freund (and...@anarazel.de) wrote: > To make slot usage in pg_receivexlog easier, should we add > --create-slot-if-not-exists? That'd mean you could run the same command > the first and later invocation. Yes, please. Thanks! Stephen signature.asc Description: Digital signature
[HACKERS] pg_receivexlog --create-slot-if-not-exists
Hi, To make slot usage in pg_receivexlog easier, should we add --create-slot-if-not-exists? That'd mean you could run the same command the first and later invocation. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers