Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-17 Thread Andres Freund
On 2015-02-17 12:18:41 +0900, Fujii Masao wrote: > On Fri, Feb 13, 2015 at 9:18 AM, Andres Freund wrote: > > On 2015-02-12 11:44:05 -0800, Sergey Konoplev wrote: > >> On Thu, Feb 12, 2015 at 11:40 AM, Andres Freund > >> wrote: > >> > This obviously should not be the case. I'll have a look in a c

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-17 Thread Andres Freund
On 2015-02-17 12:18:41 +0900, Fujii Masao wrote: > On Fri, Feb 13, 2015 at 9:18 AM, Andres Freund wrote: > > Somewhat uckily it's 9.2 only (9.3, 9.4 and master look correct, earlier > > releases don't have pg_receivexlog) > > Are you planning to back-patch the fix to 9.2? Yes, but I want to look

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-16 Thread Fujii Masao
On Fri, Feb 13, 2015 at 9:18 AM, Andres Freund wrote: > On 2015-02-12 11:44:05 -0800, Sergey Konoplev wrote: >> On Thu, Feb 12, 2015 at 11:40 AM, Andres Freund >> wrote: >> > This obviously should not be the case. I'll have a look in a couple of >> > hours. Until then you can likely just work

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-12 Thread Sergey Konoplev
On Thu, Feb 12, 2015 at 4:18 PM, Andres Freund wrote: > No need for debugging. It's plain and simply a (cherry-pick) conflict I > resolved wrongly during backpatching. 9.3, 9.4 and master do not have > that problem. That whole fix was quite painful because every single > release had significantly

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-12 Thread Andres Freund
On 2015-02-12 11:44:05 -0800, Sergey Konoplev wrote: > On Thu, Feb 12, 2015 at 11:40 AM, Andres Freund > wrote: > > This obviously should not be the case. I'll have a look in a couple of > > hours. Until then you can likely just work around the problem by creating > > the archive_status direct

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-12 Thread Sergey Konoplev
On Thu, Feb 12, 2015 at 11:40 AM, Andres Freund wrote: > This obviously should not be the case. I'll have a look in a couple of hours. > Until then you can likely just work around the problem by creating the > archive_status directory. Thank you. Just let me know if you need some extra info or

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-12 Thread Andres Freund
Hi. This obviously should not be the case. I'll have a look in a couple of hours. Until then you can likely just work around the problem by creating the archive_status directory. -- Please excuse brevity and formatting - I am writing this on my mobile phone. Andres Freund

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-12 Thread Sergey Konoplev
On Thu, Feb 12, 2015 at 11:13 AM, Andres Freund wrote: >>I started getting these errors after upgrading from 9.2.8 to 9.2.10. >>Is it something critical that requires version downgrade or I can just >>ignore that errors? > > What errors are you getting in precisely which circumstances? You're usin

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-12 Thread Andres Freund
On February 12, 2015 8:11:05 PM CET, Sergey Konoplev wrote: >Hi, > >On Mon, Jan 5, 2015 at 4:34 AM, Andres Freund >wrote: >>> >> pg_receivexlog: could not create archive status file >>> >> "mmm/archive_status/00010003.done": No such file >or >>> >> directory >>> > >>> > Dang. Stup

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-02-12 Thread Sergey Konoplev
Hi, On Mon, Jan 5, 2015 at 4:34 AM, Andres Freund wrote: >> >> pg_receivexlog: could not create archive status file >> >> "mmm/archive_status/00010003.done": No such file or >> >> directory >> > >> > Dang. Stupid typo. And my tests didn't catch it, because I had >> > archive_direc

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-01-05 Thread Andres Freund
On 2015-01-05 18:49:06 +0900, Fujii Masao wrote: > On Mon, Jan 5, 2015 at 6:22 PM, Andres Freund wrote: > > On 2015-01-05 16:22:56 +0900, Fujii Masao wrote: > >> On Sun, Jan 4, 2015 at 5:47 AM, Andres Freund > >> wrote: > >> > On 2015-01-03 16:03:36 +0100, Andres Freund wrote: > >> > pg_baseback

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-01-05 Thread Fujii Masao
On Mon, Jan 5, 2015 at 6:22 PM, Andres Freund wrote: > On 2015-01-05 16:22:56 +0900, Fujii Masao wrote: >> On Sun, Jan 4, 2015 at 5:47 AM, Andres Freund wrote: >> > On 2015-01-03 16:03:36 +0100, Andres Freund wrote: >> > pg_basebackup really >> > changed heavily since it's introduction. And despa

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-01-05 Thread Andres Freund
On 2015-01-05 16:22:56 +0900, Fujii Masao wrote: > On Sun, Jan 4, 2015 at 5:47 AM, Andres Freund wrote: > > On 2015-01-03 16:03:36 +0100, Andres Freund wrote: > > pg_basebackup really > > changed heavily since it's introduction. And desparately needs some > > restructuring. > > The patch seems to

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-01-04 Thread Fujii Masao
On Sun, Jan 4, 2015 at 5:47 AM, Andres Freund wrote: > On 2015-01-03 16:03:36 +0100, Andres Freund wrote: >> On 2014-12-31 16:32:19 +0100, Andres Freund wrote: >> > On 2014-12-05 16:18:02 +0900, Fujii Masao wrote: >> > > On Fri, Dec 5, 2014 at 9:28 AM, Andres Freund >> > > wrote: >> > > > So I t

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-01-03 Thread Andres Freund
On 2015-01-03 16:03:36 +0100, Andres Freund wrote: > On 2014-12-31 16:32:19 +0100, Andres Freund wrote: > > On 2014-12-05 16:18:02 +0900, Fujii Masao wrote: > > > On Fri, Dec 5, 2014 at 9:28 AM, Andres Freund > > > wrote: > > > > So I think we just need to make pg_basebackup create to .ready > >

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2015-01-03 Thread Andres Freund
On 2014-12-31 16:32:19 +0100, Andres Freund wrote: > On 2014-12-05 16:18:02 +0900, Fujii Masao wrote: > > On Fri, Dec 5, 2014 at 9:28 AM, Andres Freund > > wrote: > > > So I think we just need to make pg_basebackup create to .ready > > > files. > > > > s/.ready/.done? If yes, +1. > > That unfor

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2014-12-31 Thread Andres Freund
Hi, On 2014-12-05 16:18:02 +0900, Fujii Masao wrote: > On Fri, Dec 5, 2014 at 9:28 AM, Andres Freund wrote: > > So I think we just need to make pg_basebackup create to .ready > > files. > > s/.ready/.done? If yes, +1. That unfortunately requires changes to both backend and pg_basebackup to supp

Re: [HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2014-12-04 Thread Fujii Masao
On Fri, Dec 5, 2014 at 9:28 AM, Andres Freund wrote: > Hi, > > We've recently observed a case where, after a promotion, a postgres > server suddenly started to archive a large amount of old WAL. > > After some digging the problem is this: > > pg_basebackup -X creates files in pg_xlog/ without crea

[HACKERS] pg_basebackup -x/X doesn't play well with archive_mode & wal_keep_segments

2014-12-04 Thread Andres Freund
Hi, We've recently observed a case where, after a promotion, a postgres server suddenly started to archive a large amount of old WAL. After some digging the problem is this: pg_basebackup -X creates files in pg_xlog/ without creating the corresponding .done file. Note that walreceiver *does* cre