Re: [PATCHES] Patch for recent PITR bug

2007-06-08 Thread Jon Colverson
Simon Riggs wrote: Patch to fix recent PITR bug, with proposals as discussed on -admin and -hackers. Patch implements option #3, as proposed here: http://archives.postgresql.org/pgsql-hackers/2007-06/msg00234.php This is a fairly important bug fix, backpatch required. Jon, can you confirm this f

[PATCHES] Patch for recent PITR bug

2007-06-08 Thread Simon Riggs
Patch to fix recent PITR bug, with proposals as discussed on -admin and -hackers. Patch implements option #3, as proposed here: http://archives.postgresql.org/pgsql-hackers/2007-06/msg00234.php This is a fairly important bug fix, backpatch required. Jon, can you confirm this fixes for you? I conf

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Jeff Davis
On Fri, 2007-06-08 at 11:57 -0700, Jeff Davis wrote: > On Fri, 2007-06-08 at 14:36 -0400, Tom Lane wrote: > > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > > > Here's an update of the patch. I reverted the behavior at end of scan > > > back to the way it was in Jeff's original patch, and disabl

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Jeff Davis
On Fri, 2007-06-08 at 14:36 -0400, Tom Lane wrote: > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > > Here's an update of the patch. I reverted the behavior at end of scan > > back to the way it was in Jeff's original patch, and disabled reporting > > the position when moving backwards. > > Ap

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > On Fri, 2007-06-08 at 12:22 -0400, Tom Lane wrote: >> Now that I'm awake, it is reachable code, per this comment: >> >> * Note: when we fall off the end of the scan in either direction, we >> * reset rs_inited. This means that a further request with the sa

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Here's an update of the patch. I reverted the behavior at end of scan > back to the way it was in Jeff's original patch, and disabled reporting > the position when moving backwards. Applied with minor editorializations --- notably, I got rid of th

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Jeff Davis
On Fri, 2007-06-08 at 12:22 -0400, Tom Lane wrote: > Now that I'm awake, it is reachable code, per this comment: > > * Note: when we fall off the end of the scan in either direction, we > * reset rs_inited. This means that a further request with the same > * scan direction will restart the sca

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > On Fri, 2007-06-08 at 11:05 +0100, Heikki Linnakangas wrote: >> BTW: Should we do the synchronization in the non-page-at-a-time mode? > http://archives.postgresql.org/pgsql-hackers/2006-09/msg01199.php > There is a very minor assumption there that scans o

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Jeff Davis
On Fri, 2007-06-08 at 11:05 +0100, Heikki Linnakangas wrote: > BTW: Should we do the synchronization in the non-page-at-a-time mode? > It's not many lines of code to do so, but IIRC that codepath is only > used for catalog access. System tables really shouldn't grow that big, > and if they do we

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Jeff Davis <[EMAIL PROTECTED]> writes: >>> Just to be sure: a backwards-started scan is currently unreachable code, >>> correct? >> >> [ yawn... ] I think so, but I wouldn't swear to it right at the moment. >> In any case it doe

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> It occurs to me that there's an actual bug here for catalog access. >> The code assumes that it can measure rs_nblocks only once and not worry >> about tuples added beyond that endpoint. But this is only true when >> using an MVCC

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: BTW: Should we do the synchronization in the non-page-at-a-time mode? It's not many lines of code to do so, but IIRC that codepath is only used for catalog access. System tables really shouldn't grow that big, and if they do we sho

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > BTW: Should we do the synchronization in the non-page-at-a-time mode? > It's not many lines of code to do so, but IIRC that codepath is only > used for catalog access. System tables really shouldn't grow that big, > and if they do we shouldn't be

Re: [HACKERS] [PATCHES] [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit

2007-06-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: >> Matthew T. O'Connor wrote: >>> Can you make 0 and -1 both valid disabled values? That way it will be >>> compatible with previous releases. >> >> Heh, sure, we can do that too and it doesn't seem like anybody would >> object. I will patch the docume

Re: [HACKERS] [PATCHES] [BUGS] BUG #3326: Invalid lower bound of autovacuum_cost_limit

2007-06-08 Thread Alvaro Herrera
Alvaro Herrera wrote: > Matthew T. O'Connor wrote: > > Can you make 0 and -1 both valid disabled values? That way it will be > > compatible with previous releases. > > Heh, sure, we can do that too and it doesn't seem like anybody would > object. I will patch the documentation so that that the

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Heikki Linnakangas
Tom Lane wrote: Jeff Davis <[EMAIL PROTECTED]> writes: Just to be sure: a backwards-started scan is currently unreachable code, correct? [ yawn... ] I think so, but I wouldn't swear to it right at the moment. In any case it doesn't seem like a path that we need to optimize. Agreed, let's j

Re: [PATCHES] Synchronized scans

2007-06-08 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: I fixed a little off-by-one in "backward scan, not inited" branch, but I was unable to test it. It seems that code is actually never used because that case is optimized to a rewind in the executor. I marked those seemingly unreacha