Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-07 Thread Michael Paquier
(catching up here) On Sun, May 7, 2017 at 9:01 AM, Andres Freund wrote: > Turns out this isn't the better fix, because the checkpoint code > compares with the actual record LSN (rather than the end+1 that > XLogInsert() returns). We'd start having to do more bookkeeping or

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-06 Thread Andres Freund
Hi, On 2017-05-04 18:24:47 -0700, Andres Freund wrote: > Hi, > > On 2016-12-22 19:33:30 +, Andres Freund wrote: > > Skip checkpoints, archiving on idle systems. > > As part of an independent bugfix I noticed that Michael & I appear to > have introduced an off-by-one here. A few locations do

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-05 Thread Amit Kapila
On Fri, May 5, 2017 at 11:57 AM, Andres Freund wrote: > Hi, > > On 2017-05-05 11:50:12 +0530, Amit Kapila wrote: >> I see that EndPos can be updated in one of the cases after releasing >> the lock (refer below code). Won't that matter? > > I can't see how it'd in the cases

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-05 Thread Andres Freund
Hi, On 2017-05-05 11:50:12 +0530, Amit Kapila wrote: > I see that EndPos can be updated in one of the cases after releasing > the lock (refer below code). Won't that matter? I can't see how it'd in the cases that'd matter for GetLastImportantRecPtr() - but it'd probably good to note it in the

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-05 Thread Amit Kapila
On Fri, May 5, 2017 at 11:43 AM, Andres Freund wrote: > On 2017-05-05 11:04:14 +0530, Amit Kapila wrote: >> On Fri, May 5, 2017 at 6:54 AM, Andres Freund wrote: >> > Hi, >> > >> > On 2016-12-22 19:33:30 +, Andres Freund wrote: >> >> Skip checkpoints,

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-05 Thread Andres Freund
On 2017-05-05 11:04:14 +0530, Amit Kapila wrote: > On Fri, May 5, 2017 at 6:54 AM, Andres Freund wrote: > > Hi, > > > > On 2016-12-22 19:33:30 +, Andres Freund wrote: > >> Skip checkpoints, archiving on idle systems. > > > > As part of an independent bugfix I noticed that

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-04 Thread Amit Kapila
On Fri, May 5, 2017 at 6:54 AM, Andres Freund wrote: > Hi, > > On 2016-12-22 19:33:30 +, Andres Freund wrote: >> Skip checkpoints, archiving on idle systems. > > As part of an independent bugfix I noticed that Michael & I appear to > have introduced an off-by-one here. A

[HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-04 Thread Andres Freund
Hi, On 2016-12-22 19:33:30 +, Andres Freund wrote: > Skip checkpoints, archiving on idle systems. As part of an independent bugfix I noticed that Michael & I appear to have introduced an off-by-one here. A few locations do comparisons like: /* * Only log if enough