Re: [HACKERS] [PATCHES] GIN improvements

2008-07-13 Thread Teodor Sigaev
Updated: http://www.sigaev.ru/misc/fast_insert_gin-0.9.gz need more review of fast_insert yet? It looked like a number of people commented on it already. I still havn't clearness of acceptability for suggested aminsertcleanup calling. -- Teodor S

Re: [HACKERS] [PATCHES] GIN improvements

2008-07-11 Thread Teodor Sigaev
pport/synchronize with multicolumn GIN - both patches touch the same pieces of code, and I didn't make a single patch to simplify review. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -

Re: [HACKERS] [PATCHES] GIN improvements

2008-07-08 Thread Teodor Sigaev
I looked this over and it looks good in general. May I think that patch passed review and commit it? -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list

Re: [PATCHES] GIN improvements

2008-07-07 Thread Teodor Sigaev
index is binary compatible with current index :) -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subs

Re: [PATCHES] Multi-column GIN

2008-07-04 Thread Teodor Sigaev
*1.885* ms4.994 ms Index: ~340 s~200 s Insert: 72 s/166 s/1 -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@pos

Re: [PATCHES] GIN improvements

2008-07-02 Thread Teodor Sigaev
Sync with current CVS HEAD and post in hackers- too because patches- close to the closing. http://www.sigaev.ru/misc/fast_insert_gin-0.7.gz http://www.sigaev.ru/misc/multicolumn_gin-0.3.gz -- Teodor Sigaev E-mail: [EMAIL PROTECTED

Re: [PATCHES] GIN improvements

2008-06-17 Thread Teodor Sigaev
nsert into GIN' patch with CVS. Objections? -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make

Re: [PATCHES] Refactoring xlogutils.c

2008-06-10 Thread Teodor Sigaev
ith a fake Relation struct, and findParents will call ReadBuffer()... GiST's function gistContinueInsert() is working by similar way. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent vi

Re: [PATCHES] GIN improvements

2008-06-10 Thread Teodor Sigaev
is much-much more important (or crucial) than insertion time. Or table stores read-only values. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (

Re: [PATCHES] GIN improvements

2008-06-10 Thread Teodor Sigaev
structure then it's time to call insert cleanup. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make

Re: [PATCHES] GIN improvements

2008-06-06 Thread Teodor Sigaev
ay take several seconds in unpredictable moment. the buffer. To keep that overhead out of the main codepath, we could make autovacuum to flush the buffers periodically. Do you mean that GIN sends a "smoke signal" to the autovacuum launcher process to ask about v

Re: [PATCHES] GIN improvements

2008-06-06 Thread Teodor Sigaev
ethod was introduced. - added documentation Suppose, patch is ready to review/commit... -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-pa

[PATCHES] GIN improvements

2008-05-30 Thread Teodor Sigaev
(fast insertion) feature? If so, what is a default value? It's not clear to me. Note: These patches are mutually exclusive because they touch the same pieces of code and I'm too lazy to manage several depending patches. I don't see any problem to join patc

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-16 Thread Teodor Sigaev
There seems to be something broken here: it's acting like prefix search is on all the time, eg I'm in sackcloth and ashes... Fixed and extended regression tests. http://www.sigaev.ru/misc/tsearch_prefix-0.9.gz -- Teodor Sigaev E-mail: [EMAIL

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-15 Thread Teodor Sigaev
http://www.sigaev.ru/misc/wildspeed-0.12.tgz Changes: - Sync with CVS HEAD - add third option (StrategyNumber) for comparePartialFn. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Se

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-05-13 Thread Teodor Sigaev
27;ll add this option. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-04-22 Thread Teodor Sigaev
http://www.sigaev.ru/misc/partial_match_gin-0.9.gz Sync with CVS. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To

Re: [PATCHES] Partial match in GIN (next vesrion)

2008-04-15 Thread Teodor Sigaev
d-0.11.tgz Sync with CVS changes and partial match GIN patch. Teach opclass to correct use of recheck feature. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches ma

Re: [PATCHES] [HACKERS] Remove lossy-operator RECHECK flag?

2008-04-14 Thread Teodor Sigaev
g to cost light optimization... This is still WIP because I haven't touched any contrib code, but as far as the main backend goes I think it's ready to apply. Patch to all contrib modules: http://www.sigaev.ru/misc/contrib.patch.gz -- Teodor Sigaev

Re: [PATCHES] Partial match in GIN

2008-04-10 Thread Teodor Sigaev
could satisfy '%foo%' using a regular and a reverse B-tree index, and a bitmap AND. Which is interestingly similar to the way you proposed to use a TIDBitmap within GIN. -- Teodor Sigaev E-mail: [EMAIL PROTECTED]

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Teodor Sigaev
is impossible for btree. But I don't like a hack around LIKE support in BTree. This support uses outflank ways missing regular one. I'm thinking about add new strategy to Btree and allow directly support of prefix LIKE search. And BTree will scan index while compare method with option

[PATCHES] Partial match in GIN

2008-04-04 Thread Teodor Sigaev
indexqual_opclause(). NOTICE 2: it seems to me, that similar technique could be implemented for ordinary BTree to eliminate hack around LIKE support. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.

Re: [PATCHES] [HACKERS] Include Lists for Text Search

2008-03-10 Thread Teodor Sigaev
suspiciously long for human input. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http

Re: [PATCHES] [HACKERS] Include Lists for Text Search

2008-03-10 Thread Teodor Sigaev
account Clinton' For another dictionary ( dictionary of number, snowball ) that option is a meaningless. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent via pgsql-patches mailing lis

Re: [PATCHES] [HACKERS] Include Lists for Text Search

2008-03-10 Thread Teodor Sigaev
ALTER TEXT SEARCH DICTIONARY foo (...) WITH ( filtering=on|off, store_original=on|off ); Or per token's type/dictionary pair. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ -- Sent vi

Re: [PATCHES] [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit

2008-03-07 Thread Teodor Sigaev
_type.h) field. It contains number of bytes between first lexeme in tsvector and needed lexeme. So, limitation is total length of lexemes plus theirs positional information. -- Teodor Sigaev E-mail: [EMAIL PROTECTED]

Re: [PATCHES] Proposed patch to change TOAST compression strategy

2008-02-29 Thread Teodor Sigaev
notebook: Core2 Duo 1.8MHz, 2Gb with default postgres.conf 8.4 without patch: Time: 10883,368 ms 8.4 with patch (db was reinited) Time: 9654,266 ms -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW:

Re: [PATCHES] Proposed patch to change TOAST compression strategy

2008-02-19 Thread Teodor Sigaev
Magnus, could you provide dump of tsvector column of archive search? I'll make a test with and without Tom's patch. I have not done any performance testing of these changes --- does anyone have specific test scenarios they'd like to try? -- Teodor Sigaev

Re: [PATCHES] Proposed patch to change TOAST compression strategy

2008-02-18 Thread Teodor Sigaev
line and rank reads a lot of tsvectors. It seems to me that ranking test will be very clear: rank function reads whole tsvector and returns small amount of data (just a number). Another testing focus may be a lossy indexes, like a index over polygons. -- Teodor Sigaev

Re: [PATCHES] minor compiler warning in backend/utils/adt/tsrank.c

2007-09-20 Thread Teodor Sigaev
-- ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match -- Teodor Sigaev

Re: [PATCHES] [COMMITTERS] pgsql: Remove QueryOperand->istrue flag, it was used only in cover

2007-09-12 Thread Teodor Sigaev
This change introduced a compiler warning. Here is a fix for it. Remove QueryOperand->istrue flag, it was used only in cover ranking (ts_rank_cd). Use palloc'ed array in ranking instead of flag. Thank you, committed -- Teodor Sigaev E-mail: [EMAIL P

Re: [PATCHES] Yet more tsearch refactoring

2007-09-10 Thread Teodor Sigaev
memory, but is more readable in source code. The POSDATAPTR and POSDATALEN macros are still used, though it would now be more readable to access the fields in WordEntryPosVector directly. Did you check it on 64-bit boxes with strict alignment? I remember that was a headache for me. -- Teodor

Re: [PATCHES] tsearch refactorings

2007-09-07 Thread Teodor Sigaev
I am getting confused with the patches and version I have lying around here... I think I'll have to wait for review of the patches I've posted this far before I continue hacking. Sorry for delay - I was busy by another. All your patches are committed with very small changes. -- Teo

Re: [PATCHES] tsearch refactorings

2007-09-07 Thread Teodor Sigaev
BTW, Teodor, are you intending to review/apply Heikki's tsearch fixes, or do you want someone else to do it? I'll do it. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www

Re: [PATCHES] tsearch refactorings

2007-09-05 Thread Teodor Sigaev
Heikki Linnakangas wrote: Teodor Sigaev wrote: Ok. Probably easiest to do that by changing the palloc to palloc0 in parse_tsquery. and change sizeof to sizeof(QueryItem) Do you mean the sizeofs in the memcpys in parse_tsquery? You can't Oops, I meant pallocs in push* function. pallo

Re: [PATCHES] tsearch refactorings

2007-09-05 Thread Teodor Sigaev
Ok. Probably easiest to do that by changing the palloc to palloc0 in parse_tsquery. and change sizeof to sizeof(QueryItem) -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru

Re: [PATCHES] tsearch refactorings

2007-09-05 Thread Teodor Sigaev
ns I found. Some of them might have a natural limit so that you can't force arbitrarily deep recursions, but check_stack_depth() is cheap enough that seems best to just stick it into anything that might be a problem. Agreed. -- Teodor Sigaev E-mail: [

Re: [PATCHES] tsearch refactorings

2007-09-05 Thread Teodor Sigaev
objections, QTNode and NODE are tree-like structures, but TSQuery is a postfix notation for storage in plain memory. NODE is used only cleanup stop-word placeholders, so it's a binary tree while QTNode represents t-ary tree (with any number of children). Thank you for your interesting in

Re: [PATCHES] tsearch core path, v0.58

2007-08-20 Thread Teodor Sigaev
Tom Lane wrote: Teodor Sigaev <[EMAIL PROTECTED]> writes: http://www.sigaev.ru/misc/tsearch_core-0.58.gz What is src/backend/utils/tsearch/dict_ispell/parse.h ? oops - that is unused file after some experiments. Will be removed from patch. Well, I know what it *is*: it's b

[PATCHES] tsearch core path, v0.58

2007-07-23 Thread Teodor Sigaev
arch-config=CFG switch. 6) pg_dump, psql are changed accordingly. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ ---(end of broadcast)--- TI

[PATCHES] index support is NULL

2007-03-30 Thread Teodor Sigaev
ScanKey->sk_strategy = InvalidStrategy and btree code transforms it to BTEqualStrategyNumber in _bt_preprocess_keys(), btcostestimate knows that fact too. GiST doesn't need to transform strategy - it looks at SK_INDEXFINDNULL only. -- Teodor Sigaev

[PATCHES] tsearch_core patch for inclusion

2007-03-29 Thread Teodor Sigaev
nd words ( German, Norwegian ). So, please, test it - we don't know that languages at all. 2 added recent fixes of contrib/tsearch2 3 fix usage of fopen/fclose -- Teodor Sigaev E-mail: [EMAIL PROTECTED]

Re: [PATCHES] seg regression failures

2007-03-23 Thread Teodor Sigaev
& (a->lower <= b->upper)) || ((b->upper >= a->upper) && (b->lower <= a->upper)) ) ? true : false; } -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http:

Re: [PATCHES] Updated bitmap index patch

2007-03-12 Thread Teodor Sigaev
I don't very like GiST changes: gistgetbitmap will lock/unlock page for every tuple. It seems to me taht is better to change gistnext function to use some sort callback, for example. Or have static array for tids in gistgetbitmap... -- Teodor Sigaev E

Re: [PATCHES] First implementation of GIN for pg_trgm

2007-02-22 Thread Teodor Sigaev
I think it can be interesting for other flavours of GIN usage. Is there a way to add the number of entries of the considered indexed item to the consistent prototype without adding too much overhead and complexity? We are thinking about adding extra value, but it's still only thinking. ---

Re: [PATCHES] First implementation of GIN for pg_trgm

2007-02-22 Thread Teodor Sigaev
matter for index scan. The attached patch adds a RECHECK too. It seems to work correctly but the RECHECK COND costs a lot of time :/. :( How long is average length of strings in table? -- Teodor Sigaev E-mail: [EMAIL

Re: [PATCHES] First implementation of GIN for pg_trgm

2007-02-22 Thread Teodor Sigaev
d mark '%' operator in CREATE OPERATOR CLASS with RECHECK option. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [pgsql-patches] Lock compatibility matrix

2007-01-30 Thread Teodor Sigaev
> representations, both redundant with the textual description. I don't Docs patch is in SGML table representation, text view is a demonstration in mail. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] W

[pgsql-patches] Docs improvements

2007-01-26 Thread Teodor Sigaev
| X | +---+---+---+---+---+---+---+---+ Upper row and left column contain abbreviation of lock modes by the first characters( AS - ACCESS SHARE ) -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.siga

Re: [pgsql-patches] [HACKERS] [PATCHES] Bundle of patches

2007-01-10 Thread Teodor Sigaev
Nice, thanks a lot. Tom Lane wrote: Teodor Sigaev <[EMAIL PROTECTED]> writes: Just a freshing for clean applying.. http://www.sigaev.ru/misc/user_defined_typmod-0.11.gz Applied with some revisions, and pg_dump support and regression tests added. regards, to

Re: [PATCHES] Bundle of patches

2006-12-29 Thread Teodor Sigaev
This is not responding to my concern. What you presented was an > Sorry, I see your point now. Is that test enough? Or I should make more? -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev

Re: [HACKERS] [PATCHES] Bundle of patches

2006-12-29 Thread Teodor Sigaev
Just a freshing for clean applying.. http://www.sigaev.ru/misc/user_defined_typmod-0.11.gz Is any objections to commit? -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru

Re: [HACKERS] [PATCHES] Bundle of patches

2006-12-21 Thread Teodor Sigaev
0.9 doesn't apply cleanly after Peter's changes, so, new version http://www.sigaev.ru/misc/user_defined_typmod-0.10.gz Teodor Sigaev wrote: >> Perhaps an array of int4 would be better? How much Done http://www.sigaev.ru/misc/user_defined_typmod-0.9.gz The patch needs mor

Re: [PATCHES] Bundle of patches

2006-12-20 Thread Teodor Sigaev
>> Perhaps an array of int4 would be better? How much Done http://www.sigaev.ru/misc/user_defined_typmod-0.9.gz The patch needs more cleanup before applying, too, eg make comments match code, get rid of unused keywords added to gram.y. Cleaned. -- Teodor

Re: [PATCHES] Bundle of patches

2006-12-06 Thread Teodor Sigaev
0) or (f1>8 and f1<9)order by f1, f2 limit 10; NOTICE: Elapsed time 0.000962 sec 3) 4 clauses # select * from foo where (f1>4 and f1<5) or (f1>6 and f1<7) or (f1>8 and f1<9) or (f1>95000 and f1<96000) order by f1, f2 limit 10;

Re: [PATCHES] Bundle of patches

2006-12-05 Thread Teodor Sigaev
rows=10 loops=1) -> Result (cost=0.00..6902.27 rows=3928 width=8) (actual time=0.111..0.197 rows=10 loops=1) -> Append (cost=0.00..6902.27 rows=3928 width=8) (actual time=0.102..0.156 rows=10 loops=1) -> Index Scan using idx on foo (cost=0.00

Re: [PATCHES] Bundle of patches

2006-12-04 Thread Teodor Sigaev
Is there a guarantee that hash value of some not-null keys doesn't equal to special hash code? the patch to do IS NULL only. But if we are going areto support both, we probably have to have two pg_am flags not one. GiST isn't effective with single NOT NULL condition ... So,

Re: [PATCHES] Bundle of patches

2006-12-04 Thread Teodor Sigaev
sult is still going to have to pack into 32 bits. As I remember, I tried to use some thing else but, I've got a lot conflicts with AexprConst: func_name '(' expr_list ')' Sconst The patch needs more cleanup before applying, too, eg make comments match code, g

Re: [PATCHES] Bundle of patches

2006-12-04 Thread Teodor Sigaev
rantee that target lists are the same. Sorry, but I didn't find clearer solution... -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [PATCHES] Bundle of patches

2006-12-04 Thread Teodor Sigaev
or-last into the planner's model of sort order, Agree, but I tried to keep patches independent as possible... If we will have agreement about ways to resolve, I'll will time to work further in foreseeable future. -- Teodor Sigaev

[PATCHES] Bundle of patches

2006-12-04 Thread Teodor Sigaev
t; 60100 ) ORDER BY a LIMIT 20; Limit (cost=0.00..4.14 rows=20 width=4) (actual time=0.168..1.001 rows=20 loops=1) -> Index Scan using aidx on tst (cost=0.00..2344.85 rows=11338 width=4) (actual time=0.162..0.935 rows=20 loops=1) Index Cond: ((a > 5) AND (a < 6100

Re: [HACKERS] [PATCHES] Use of backslash in tsearch2

2006-08-23 Thread Teodor Sigaev
Patch isn't full, simple test (values are took from regression.diffs): and try dump table and restore: ERROR: syntax error CONTEXT: COPY tt, line 5, column tq: "'1 ''2'" Attached cumulative patch fixes problem, but I have some doubts, is it

Re: [PATCHES] Use of backslash in tsearch2

2006-08-22 Thread Teodor Sigaev
3'' 4 ', NULL); # insert into tt values ( NULL, E'''1 \\''2'''); # insert into tt values ( NULL, E'''1 \\''2'''); # insert into tt values ( NULL, E'1&(''2''&a

Re: [PATCHES] tsearch2 makefile fixes

2005-11-02 Thread Teodor Sigaev
ubdir = contrib/tsearch2/wordparser top_builddir = ../../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http:

Re: [PATCHES] tsearch2 makefile fixes

2005-11-02 Thread Teodor Sigaev
nd our makefile structure. Please consider applying this to 8.1 (or just let me know and I'll do it for you). -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/