Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Joshua D. Drake
On 10/26/2015 08:14 PM, Michael Paquier wrote: On Tue, Oct 27, 2015 at 7:18 AM, José Luis Tallón wrote: Given the rest of the thread any possibility whatsoever that it'd be backpatched into 9.5 before release? Guess it'd be a very welcome addition This will be available in 9.6. 9.

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Michael Paquier
On Tue, Oct 27, 2015 at 7:18 AM, José Luis Tallón wrote: > Given the rest of the thread any possibility whatsoever that it'd be > backpatched into 9.5 before release? > Guess it'd be a very welcome addition This will be available in 9.6. 9.5 is aimed at being stabilized now, so no new

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread José Luis Tallón
On 10/26/2015 12:58 PM, Joshua D. Drake wrote: Hello, The fact that pg_basebackup doesn't use replicaiton slots, is that a technical limitation or just a, "we need a patch"? Given the rest of the thread any possibility whatsoever that it'd be backpatched into 9.5 before release? G

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Shulgin, Oleksandr
On Mon, Oct 26, 2015 at 12:58 PM, Joshua D. Drake wrote: > Hello, > > The fact that pg_basebackup doesn't use replicaiton slots, is that a > technical limitation or just a, "we need a patch"? > I believe it does, but only in master so far, not even in 9.5: http://www.postgresql.org/docs/devel/st

Re: [HACKERS] pg_basebackup and replication slots

2015-10-26 Thread Euler Taveira
On 26-10-2015 08:58, Joshua D. Drake wrote: Hello, The fact that pg_basebackup doesn't use replicaiton slots, is that a technical limitation or just a, "we need a patch"? It is not in 9.5 but it is already there. commit 0dc848b0314d63188919f1ce943730eac684dccd Author: Peter Eisentraut Date:

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Peter Eisentraut
On 7/29/15 8:00 AM, Andres Freund wrote: > As far as I understand this subthread the goal is to have a > pg_basebackup that internally creates a slot, so it can guarantee that > all the required WAL is present till streamed out by -X > stream/fetch. The problem with just creating a slot is that it'

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Andres Freund
On 2015-07-29 13:45:22 +0100, Simon Riggs wrote: > So this would be needed when creating a standalone backup that would not be > persistently connected to the master, yet we want to bring it up as a > live/writable server in a single command I'm not understanding what you mean with 'single command

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Simon Riggs
On 29 July 2015 at 13:00, Andres Freund wrote: > As far as I understand this subthread the goal is to have a > pg_basebackup that internally creates a slot, so it can guarantee that > all the required WAL is present till streamed out by -X > stream/fetch. The problem with just creating a slot is

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Andres Freund
On 2015-07-29 12:47:01 +0100, Simon Riggs wrote: > On 29 July 2015 at 11:43, Andres Freund wrote: > > > On 2015-07-29 09:17:04 +0100, Simon Riggs wrote: > > > On 29 July 2015 at 09:09, Andres Freund wrote: > > > > The point of using a temporary slot is to not have a > > > > leftover slot afterwa

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Simon Riggs
On 29 July 2015 at 11:43, Andres Freund wrote: > On 2015-07-29 09:17:04 +0100, Simon Riggs wrote: > > On 29 July 2015 at 09:09, Andres Freund wrote: > > > The point of using a temporary slot is to not have a > > > leftover slot afterwards, reserving resources. Especially important if > > > the b

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Andres Freund
On 2015-07-29 09:17:04 +0100, Simon Riggs wrote: > On 29 July 2015 at 09:09, Andres Freund wrote: > > The point of using a temporary slot is to not have a > > leftover slot afterwards, reserving resources. Especially important if > > the basebackup actually failed... > > > > Creating a slot and t

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Simon Riggs
On 29 July 2015 at 09:09, Andres Freund wrote: > On 2015-07-29 08:57:38 +0100, Simon Riggs wrote: > > On 22 July 2015 at 05:43, Michael Paquier > wrote: > > > > > > > Now, do we plan to do something about the creation of a slot. I > > > imagine that it would be useful if we could have --create-s

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Andres Freund
On 2015-07-29 08:57:38 +0100, Simon Riggs wrote: > On 22 July 2015 at 05:43, Michael Paquier wrote: > > > > Now, do we plan to do something about the creation of a slot. I > > imagine that it would be useful if we could have --create-slot to > > create a slot when beginning a base backup and if-

Re: [HACKERS] pg_basebackup and replication slots

2015-07-29 Thread Simon Riggs
On 22 July 2015 at 05:43, Michael Paquier wrote: > Now, do we plan to do something about the creation of a slot. I > imagine that it would be useful if we could have --create-slot to > create a slot when beginning a base backup and if-not-exists to > control the error flow. There is already Crea

Re: [HACKERS] pg_basebackup and replication slots

2015-07-28 Thread Peter Eisentraut
On 7/22/15 12:43 AM, Michael Paquier wrote: > OK, thanks for the updated versions. Those ones look good to me. Committed, thanks. > Now, do we plan to do something about the creation of a slot. I > imagine that it would be useful if we could have --create-slot to > create a slot when beginning a

Re: [HACKERS] pg_basebackup and replication slots

2015-07-21 Thread Michael Paquier
On Wed, Jul 22, 2015 at 10:15 AM, Peter Eisentraut wrote: > On 7/2/15 3:37 AM, Michael Paquier wrote: >> 2) >> sub psql >> { >> my ($dbname, $sql) = @_; >> - run [ 'psql', '-X', '-q', '-d', $dbname, '-f', '-' ], '<', \$sql or >> die; >> + my ($stdout, $stderr); >> + run

Re: [HACKERS] pg_basebackup and replication slots

2015-07-21 Thread Peter Eisentraut
On 7/2/15 3:37 AM, Michael Paquier wrote: > Regarding patch 3, I have more comments: > 1) I think that documentation should clearly mention that if -R and -S > are used together, a primary_slot_name entry is added in the > recovery.conf generated with the slot name defined. Updated proposal attach

Re: [HACKERS] pg_basebackup and replication slots

2015-07-02 Thread Michael Paquier
On Wed, Jul 1, 2015 at 11:35 PM, Peter Eisentraut wrote: > On 7/1/15 8:37 AM, Michael Paquier wrote: >> On Wed, Jul 1, 2015 at 10:33 AM, Peter Eisentraut wrote: >>> (If you're looking at the patch and wondering why there is no code to >>> actually do anything with the replication slot, that's beca

Re: [HACKERS] pg_basebackup and replication slots

2015-07-01 Thread Peter Eisentraut
On 7/1/15 8:37 AM, Michael Paquier wrote: > On Wed, Jul 1, 2015 at 10:33 AM, Peter Eisentraut wrote: >> (If you're looking at the patch and wondering why there is no code to >> actually do anything with the replication slot, that's because the code >> that does the WAL streaming is already aware of

Re: [HACKERS] pg_basebackup and replication slots

2015-07-01 Thread Michael Paquier
On Wed, Jul 1, 2015 at 10:33 AM, Peter Eisentraut wrote: > (If you're looking at the patch and wondering why there is no code to > actually do anything with the replication slot, that's because the code > that does the WAL streaming is already aware of replication slots > because of the pg_receivex

Re: [HACKERS] pg_basebackup and replication slots

2015-06-30 Thread Peter Eisentraut
On 5/21/15 8:42 AM, Peter Eisentraut wrote: > I wonder why pg_basebackup doesn't have any support for replication slots. > > When relying on replication slots to hang on to WAL data, there is a gap > between when pg_basebackup finishes and streaming replication is started > where WAL data could be

Re: [HACKERS] pg_basebackup and replication slots

2015-05-21 Thread Heikki Linnakangas
On 05/21/2015 03:42 PM, Peter Eisentraut wrote: I wonder why pg_basebackup doesn't have any support for replication slots. When relying on replication slots to hang on to WAL data, there is a gap between when pg_basebackup finishes and streaming replication is started where WAL data could be thr