Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Bruce Momjian
Simon Riggs wrote: On Wed, 2010-06-02 at 20:28 -0400, Bruce Momjian wrote: Simon Riggs wrote: On Wed, 2010-06-02 at 15:20 -0400, Bruce Momjian wrote: The attached patch allows wal_keep_segments = -1 to keep all segements; this is particularly useful for taking a base backup,

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Heikki Linnakangas
On 03/06/10 15:15, Bruce Momjian wrote: Simon Riggs wrote: I think its much easier to find out your free disk space than it is to calculate how much WAL might be generated during backup. Disk space doesn't vary significantly on a production database. If we encourage that laziness then we will

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Bruce Momjian
Heikki Linnakangas wrote: On 03/06/10 15:15, Bruce Momjian wrote: Simon Riggs wrote: I think its much easier to find out your free disk space than it is to calculate how much WAL might be generated during backup. Disk space doesn't vary significantly on a production database. If we

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Bruce Momjian
Heikki Linnakangas wrote: On 03/06/10 15:15, Bruce Momjian wrote: Simon Riggs wrote: I think its much easier to find out your free disk space than it is to calculate how much WAL might be generated during backup. Disk space doesn't vary significantly on a production database. If we

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Heikki Linnakangas wrote: Surely we don't expect DBAs to delete old files in pg_xlog? I agree with Simon here, I think it would be better to not provide -1 as an option here. At least you better document well that you should only do that temporarily

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of jue jun 03 08:36:28 -0400 2010: Using this only temporarily is mentioned in the doc patch. Do I need more? Yeah, it's far too easy to miss. Besides, I think the wording you used is ambiguous -- it can be read as the server will temporarily keep all

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of jue jun 03 08:36:28 -0400 2010: Using this only temporarily is mentioned in the doc patch. Do I need more? Yeah, it's far too easy to miss. Besides, I think the wording you used is ambiguous -- it can be read as the server

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-03 Thread Andrew Dunstan
Heikki Linnakangas wrote: We leave that up to the DBA to clean out one way or another. We provide restartpoint_command and the %r option in restore_command to help with that. I was in fact just looking into this, and I see that there is no example restartpoint_comand script given in

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-02 Thread Robert Haas
On Wed, Jun 2, 2010 at 3:20 PM, Bruce Momjian br...@momjian.us wrote: Bruce Momjian wrote: Robert Haas wrote: On Sat, May 8, 2010 at 10:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: Uh, did we decide that 'wal_keep_segments' was the best name for this

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-02 Thread Simon Riggs
On Wed, 2010-06-02 at 15:20 -0400, Bruce Momjian wrote: The attached patch allows wal_keep_segments = -1 to keep all segements; this is particularly useful for taking a base backup, where you need all the WAL files during startup of the standby. I have documented this usage in the patch as

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-02 Thread Bruce Momjian
Simon Riggs wrote: On Wed, 2010-06-02 at 15:20 -0400, Bruce Momjian wrote: The attached patch allows wal_keep_segments = -1 to keep all segements; this is particularly useful for taking a base backup, where you need all the WAL files during startup of the standby. I have documented this

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-02 Thread Bruce Momjian
Robert Haas wrote: The attached patch allows wal_keep_segments = -1 to keep all segements; this is particularly useful for taking a base backup, where you need all the WAL files during startup of the standby. ?I have documented this usage in the patch as well. I am thinking of applying

Re: [HACKERS] Allow wal_keep_segments to keep all segments

2010-06-02 Thread Simon Riggs
On Wed, 2010-06-02 at 20:28 -0400, Bruce Momjian wrote: Simon Riggs wrote: On Wed, 2010-06-02 at 15:20 -0400, Bruce Momjian wrote: The attached patch allows wal_keep_segments = -1 to keep all segements; this is particularly useful for taking a base backup, where you need all the