Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-08-10 Thread Andres Freund
On 2015-07-30 17:14:16 +0900, Michael Paquier wrote: So, perhaps the attached is more convincing then? It just changes --create-slot to leave immediately after creation to address the complain of this thread. -- Michael Pushed that. Thanks! Andres -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-30 Thread Michael Paquier
On Wed, Jul 29, 2015 at 10:20 PM, Andres Freund and...@anarazel.de wrote: On 2015-07-29 22:17:27 +0900, Michael Paquier wrote: Here is a patch implementing those things. IMO if-not-exists does not make much sense anymore What? It's rather useful to be able to discern between 'slot was already

[HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Andres Freund
Hi, Heikki complained about pg_receivexlog --create-slot starting to stream in his talk in St. Petersburg. Saying that that makes it a hard to script feature - and I have to agree. Since that option is new to 9.5 we can should change that behaviour now if we decide to. Michael, what do you

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Michael Paquier
On Wed, Jul 29, 2015 at 4:51 PM, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/29/2015 10:37 AM, Andres Freund wrote: Heikki complained about pg_receivexlog --create-slot starting to stream in his talk in St. Petersburg. Saying that that makes it a hard to script feature - and I have to

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Heikki Linnakangas
On 07/29/2015 10:58 AM, Michael Paquier wrote: On Wed, Jul 29, 2015 at 4:51 PM, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/29/2015 10:37 AM, Andres Freund wrote: Heikki complained about pg_receivexlog --create-slot starting to stream in his talk in St. Petersburg. Saying that that makes

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Simon Riggs
On 29 July 2015 at 08:37, Andres Freund and...@anarazel.de wrote: Heikki complained about pg_receivexlog --create-slot starting to stream in his talk in St. Petersburg. Saying that that makes it a hard to script feature - and I have to agree. Since that option is new to 9.5 we can should

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Andres Freund
On 2015-07-29 08:54:40 +0100, Simon Riggs wrote: --drop-slot seems pointless, since you can just do that with psql If we make --create-slot do nothing but add the slot, then that seems pointless also Would we need to add those options to all commands, when it can be done with psql? They

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Simon Riggs
On 29 July 2015 at 09:01, Andres Freund and...@anarazel.de wrote: On 2015-07-29 08:54:40 +0100, Simon Riggs wrote: --drop-slot seems pointless, since you can just do that with psql If we make --create-slot do nothing but add the slot, then that seems pointless also Would we need to

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Shulgin, Oleksandr
On Wed, Jul 29, 2015 at 10:02 AM, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/29/2015 10:58 AM, Michael Paquier wrote: On Wed, Jul 29, 2015 at 4:51 PM, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/29/2015 10:37 AM, Andres Freund wrote: Heikki complained about pg_receivexlog

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Heikki Linnakangas
On 07/29/2015 10:37 AM, Andres Freund wrote: Heikki complained about pg_receivexlog --create-slot starting to stream in his talk in St. Petersburg. Saying that that makes it a hard to script feature - and I have to agree. Since that option is new to 9.5 we can should change that behaviour now if

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Michael Paquier
On Wed, Jul 29, 2015 at 5:02 PM, Heikki Linnakangas wrote: Hmm. pg_receivelogical is basically a debugging tool. I don't think anyone will have it integrated into production scripts etc. So maybe we could just change it. This sounds good to me as well. I'm not sure I understand the proposal

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Andres Freund
On 2015-07-29 09:23:43 +0100, Simon Riggs wrote: Creating a temporary slot goes against the whole concept of slots, so using the same id in the same script isn't actually needed, except maybe to simplify testing. The concept of a slot is to reserve resources. I don't see why it's wrong to

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Simon Riggs
On 29 July 2015 at 12:51, Michael Paquier michael.paqu...@gmail.com wrote: In short, I would propose the following: - Have --create-slot only create a slot, then exit for both pg_recvlogical and pg_receivexlog. - Have --drop-slot drop a slot, then exit. It makes more sense to create one

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Andres Freund
On 2015-07-29 13:53:31 +0100, Simon Riggs wrote: It makes more sense to create one new utility to issue replication commands than to enhance multiple utility commands to have bizarre looking additional features and modes. pg_reputil --create-slot pg_reputil --drop-slot etc Logical slots

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Michael Paquier
On Wed, Jul 29, 2015 at 10:15 PM, Andres Freund wrote: It's not that uncommon to have replicas only access the primary for replication type connections. So it seems completely sensible to use the replication protocol to manage slots. And that you can't really do with psql. Actually, you can.

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Andres Freund
On 2015-07-29 22:17:27 +0900, Michael Paquier wrote: Here is a patch implementing those things. IMO if-not-exists does not make much sense anymore What? It's rather useful to be able to discern between 'slot was already there' and 'oops, some error occured'. -1 To me the pg_recvlogical changes

Re: [HACKERS] Don'st start streaming after creating a slot in pg_receivexlog

2015-07-29 Thread Michael Paquier
On Wed, Jul 29, 2015 at 8:51 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Jul 29, 2015 at 5:02 PM, Heikki Linnakangas wrote: Hmm. pg_receivelogical is basically a debugging tool. I don't think anyone will have it integrated into production scripts etc. So maybe we could just