Re: [PATCHES] Export user visible function to make use of convert_to_scalar

2007-08-01 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: I was planning to use the first and last histogram values for the frame of reference. It could still produce some weird graphs but those cases are precisely the cases where users

Re: [PATCHES] HOT patch - version 11

2007-08-01 Thread Simon Riggs
On Wed, 2007-08-01 at 14:36 +0530, Pavan Deolasee wrote: Please see the attached version 11 of HOT patch The concept of marking the pruned tuples with LP_DELETE and reusing such tuples for subsequent UPDATEs has been removed and replaced with a simpler mechanism of repairing the page

Re: [PATCHES] HOT patch - version 11

2007-08-01 Thread Pavan Deolasee
On 8/1/07, Simon Riggs [EMAIL PROTECTED] wrote: On Wed, 2007-08-01 at 14:36 +0530, Pavan Deolasee wrote: BufferIsLockedForCleanup() should be named BufferIsAvilableForCleanup(). There is no cleanup mode, what we mean is that there is only one pin; the comments say If we are lucky enough to

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Andrew Dunstan
Andrew Dunstan wrote: The attached patch makes a very small but useful change to the behaviour of log_line_prefix, by enabling the start time (%s) and cookie (%c) logging to occur for all backends rather than just for session processes (i.e. backends started for a client connection). We

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Magnus Hagander
Andrew Dunstan wrote: Andrew Dunstan wrote: The attached patch makes a very small but useful change to the behaviour of log_line_prefix, by enabling the start time (%s) and cookie (%c) logging to occur for all backends rather than just for session processes (i.e. backends started for a

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Alvaro Herrera
Andrew Dunstan wrote: Andrew Dunstan wrote: The attached patch makes a very small but useful change to the behaviour of log_line_prefix, by enabling the start time (%s) and cookie (%c) logging to occur for all backends rather than just for session processes (i.e. backends started for a

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Andrew Dunstan
Alvaro Herrera wrote: I am also wondering if setting it in InitAuxiliaryProcess is redundant (or rather, whether the extra set in each auxiliary process is redundant with the call in InitAuxiliaryProcess). Well, it's set right at the front of SubPostmasterMain, immediately after setting

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Alvaro Herrera
Andrew Dunstan wrote: Alvaro Herrera wrote: I am also wondering if setting it in InitAuxiliaryProcess is redundant (or rather, whether the extra set in each auxiliary process is redundant with the call in InitAuxiliaryProcess). Well, it's set right at the front of SubPostmasterMain,

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Andrew Dunstan
Alvaro Herrera wrote: Andrew Dunstan wrote: Alvaro Herrera wrote: I am also wondering if setting it in InitAuxiliaryProcess is redundant (or rather, whether the extra set in each auxiliary process is redundant with the call in InitAuxiliaryProcess). Well, it's set right at

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Alvaro Herrera
Andrew Dunstan wrote: Alvaro Herrera wrote: Andrew Dunstan wrote: Alvaro Herrera wrote: I am also wondering if setting it in InitAuxiliaryProcess is redundant (or rather, whether the extra set in each auxiliary process is redundant with the call in InitAuxiliaryProcess). My

Re: [PATCHES] HOT patch - version 11

2007-08-01 Thread Heikki Linnakangas
Pavan Deolasee wrote: Please see the attached version 11 of HOT patch Thanks! One wrinkle in the patch is how the ResultRelInfo-struct is passed to heap_update, and on to heap_check_idxupdate, to check any indexed columns have changed. I think that's a modularity violation, heap_update really

[PATCHES] strpos() KMP

2007-08-01 Thread Pavel Ajtkulov
Hello, this patch allow to use Knuth-Morrison-Pratt algorithm for strpos() function (see Cormen et al. Introduction to Algorithms, MIT Press, 2001). It also works with multibyte wchar. In worst case current brute force strpos() takes O(n * m) (n m is length of strings) time (example:

Re: [PATCHES] strpos() KMP

2007-08-01 Thread Andrew Dunstan
Pavel Ajtkulov wrote: Also, I advise to use select .. where strpos(att, 'word') 0; instead select .. where attr like '%word%' (strpos must be faster than regex). The LIKE code does not use the regex engine. See src/backend/utils/adt/like.c and like_match.c - which recently got an

Re: [PATCHES] strpos() KMP

2007-08-01 Thread Tom Lane
Pavel Ajtkulov [EMAIL PROTECTED] writes: this patch allow to use Knuth-Morrison-Pratt algorithm for strpos() function (see Cormen et al. Introduction to Algorithms, MIT Press, 2001). This seems like a lot of complexity added to fix a non-problem. We've had no complaints about the speed of

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Andrew Dunstan
Alvaro Herrera wrote: My original thought was that it needed to be set anywhere MyProcPid was set. That still seems to make sense, it just looks like I missed a few places, which I should fix. +1 because of cleanliness, even if some calls turn out to be redundant. That was in fact

[PATCHES] Memory leak in tuplestore_end()

2007-08-01 Thread Neil Conway
Attached is a patch which fixes a memory leak in tuplestore_end(). Barring any objections, I'll apply this to HEAD and back branches tomorrow. -Neil Index: source/src/backend/utils/sort/tuplestore.c === RCS file:

Re: [PATCHES] enable logging of start time/cookie for all backend processes

2007-08-01 Thread Alvaro Herrera
Andrew Dunstan wrote: The attached patch makes a very small but useful change to the behaviour of log_line_prefix, by enabling the start time (%s) and cookie (%c) logging to occur for all backends rather than just for session processes (i.e. backends started for a client connection). We