Re: [PATCHES] Partial match in GIN

2008-04-09 Thread Heikki Linnakangas
Alvaro Herrera wrote: Well, LIKE %foo% is supposed to match foo unanchored, but with a btree (or two btrees) you can only get 'foo' anchored to either end of the string (or both). Ah, true. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-patches mailing

Re: [PATCHES] EXPLAIN progress info

2008-04-09 Thread Heikki Linnakangas
Tom Lane wrote: Gregory Stark <[EMAIL PROTECTED]> writes: There are downsides: Insurmountable ones at that. This one already makes it a non-starter: a) the overhead of counting rows and loops is there for every query execution, even if you don't do explain analyze. and you are also engagi

Re: [PATCHES] EXPLAIN progress info

2008-04-09 Thread Gregory Stark
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Gregory Stark <[EMAIL PROTECTED]> writes: >>> There are downsides: >> >> Insurmountable ones at that. This one already makes it a non-starter: >> >>> a) the overhead of counting rows and loops is there for every query >>> ex

[PATCHES] Improve shutdown during online backup, take 2

2008-04-09 Thread Albe Laurenz
This patch replaces the previous version http://archives.postgresql.org/pgsql-patches/2008-04/msg4.php As suggested by Simon Riggs in http://archives.postgresql.org/pgsql-patches/2008-04/msg00013.php , a smart shutdown will now wait for online backup mode to finish. The functions that touch "b

Re: [PATCHES] EXPLAIN progress info

2008-04-09 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > I think a better way to get a real "percentage done" would be to add a method > to each node which estimates its percentage done based on the percentage done > its children report and its actual and expected rows and its costs. You can spend a week inven

[PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Magnus Hagander
Attached is a patch that attempts to fix the issues with stat() not properly updating st_size on win32, as reported in this thread: http://archives.postgresql.org/pgsql-hackers/2008-03/msg01181.php It has to have a chance to affect things beyond just the pg_relation_size() function, so this patch

Re: [PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > + #ifndef WIN32 > if (stat(xlogpath, &stat_buf) == 0) > + #else > + if (pgwin32_safestat(xlogpath, &stat_buf) == 0) > + #endif Ick. Please do this the way we normally do things when we have to override broken Windows syscalls

Re: [PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: > > + #ifndef WIN32 > > if (stat(xlogpath, &stat_buf) == 0) > > + #else > > + if (pgwin32_safestat(xlogpath, &stat_buf) == 0) > > + #endif > > Ick. Please do this the way we normally do things when we have to > ov

Re: [PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Ick. > The reason not to do so was to avoid having to do the two filesystem > calls for *every* stat, instead just calling them both when we actually > need to use the st_size member. I don't think that's worth (a) the code uglifica

Re: [PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Ick. > > > The reason not to do so was to avoid having to do the two filesystem > > calls for *every* stat, instead just calling them both when we > > actually need to use the st_size member. > > I don't think

Re: [PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > Trying to prepare a patch that does it the normal way, but so far I'm > failing rather miserably. The *struct* stat is already redefined on > win32, so whenever I try #undef or so it conflicts with that :-( Since > there is no way to #undef only the par

Re: [PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: > > Trying to prepare a patch that does it the normal way, but so far > > I'm failing rather miserably. The *struct* stat is already > > redefined on win32, so whenever I try #undef or so it conflicts > > with that :-( Since there is no

Re: [PATCHES] Fix for win32 stat() problems

2008-04-09 Thread Andrew Dunstan
Magnus Hagander wrote: Tom Lane wrote: Magnus Hagander <[EMAIL PROTECTED]> writes: Trying to prepare a patch that does it the normal way, but so far I'm failing rather miserably. The *struct* stat is already redefined on win32, so whenever I try #undef or so it conflicts with that :-(