[HACKERS] conference for article
Hello to all, I realized index for moving objects in PostgreSQL DB, using GisT and I want to write an article in the conference. It will be not a scientific paper, but application track. Can anybody tell the conference where I could publish my work ? :) Best regards, Sergej Galkin
[HACKERS] how to use advanced gist options
Hello all, Now I'm trying to realize index in GiST. Everything is Ok, but I would like to know about advanced index programming options. 1) For example - can I delete entry in my picksplit procedure ? 2) Or to add logical conditions - when picksplit node ? For exampe change default when number of entries of node is much than XX, split node - to when number of entries which element state is on is much than XX, split node ? Faithfully, Sergej
[HACKERS] NEED HELP !
Hello all, I am a student-magister and I'm writting my magister work. I realized gist index TPR tree - it is like a simple R tree but moving :) Everything is compiling ok, I creating table and index, but after whese code - DB is restarting :((( * * *set enable_seqscan = false select * from table_of_moving_objects where mov_obj ~ box '(0,0) (1,1)'* I can not understand why DB is restarting ? It is restarting when SQL begins use index :((( Can anybody help me , I would by appretiate every people who downloads my sources, try to deploy index and maybe solve where is the problem. Best regards, Sergej Galkin moving_object.rar Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] NEED HELP !
I want to add than I have a piece of my code that looks very strange Datum gist_mov_penalty(PG_FUNCTION_ARGS) { GISTENTRY *origentry = (GISTENTRY *) PG_GETARG_POINTER(0); GISTENTRY *newentry = (GISTENTRY *) PG_GETARG_POINTER(1); float * result = (float *) PG_GETARG_POINTER(2); * moving_object *orig = (*origentry).key; make_now(orig); moving_object *new = (*origentry).key; make_now(new);* Is everything ok in this code ?? On Wed, Jan 13, 2010 at 8:42 PM, Sergej Galkin sergej.gal...@gmail.comwrote: Hello all, I am a student-magister and I'm writting my magister work. I realized gist index TPR tree - it is like a simple R tree but moving :) Everything is compiling ok, I creating table and index, but after whese code - DB is restarting :((( * * *set enable_seqscan = false select * from table_of_moving_objects where mov_obj ~ box '(0,0) (1,1)'* I can not understand why DB is restarting ? It is restarting when SQL begins use index :((( Can anybody help me , I would by appretiate every people who downloads my sources, try to deploy index and maybe solve where is the problem. Best regards, Sergej Galkin
Re: [HACKERS] NEED HELP !
I debugged index with gdb and found that it is segmentation fault in my procedure named *gist_mov_consistent* it is only 7 lines. So I think it is worth to publish it to public, * * *Datum gist_mov_consistent(PG_FUNCTION_ARGS)* *{* *GISTENTRY *entry = (GISTENTRY *)PG_GETARG_POINTER(0);* *BOX *query = PG_GETARG_BOX_P(1);* *StrategyNumber strategy = (StrategyNumber)PG_GETARG_UINT16(2);* ** *if (DatumGetMovP(entry-key) == NULL || query == NULL)* *PG_RETURN_BOOL(FALSE);* ** *PG_RETURN_BOOL(obj_contains(DatumGetMovP(entry-key), query));* *}* Do you have any ideas where is the problem ? :) Best regards, Sergej Galkin On Wed, Jan 13, 2010 at 8:42 PM, Sergej Galkin sergej.gal...@gmail.comwrote: Hello all, I am a student-magister and I'm writting my magister work. I realized gist index TPR tree - it is like a simple R tree but moving :) Everything is compiling ok, I creating table and index, but after whese code - DB is restarting :((( * * *set enable_seqscan = false select * from table_of_moving_objects where mov_obj ~ box '(0,0) (1,1)'* I can not understand why DB is restarting ? It is restarting when SQL begins use index :((( Can anybody help me , I would by appretiate every people who downloads my sources, try to deploy index and maybe solve where is the problem. Best regards, Sergej Galkin
Re: [HACKERS] NEED HELP !
And *int obj_contains(moving_object *a, BOX *b) { if (b-low.x a-x_low) return 0; if (b-low.y a-y_low) return 0; if (b-high.x a-x_high) return 0; if (b-high.y a-y_high) return 0; return 1; }* this is the procedure obj contains On Wed, Jan 13, 2010 at 8:56 PM, Sergej Galkin sergej.gal...@gmail.comwrote: I want to add than I have a piece of my code that looks very strange Datum gist_mov_penalty(PG_FUNCTION_ARGS) { GISTENTRY *origentry = (GISTENTRY *) PG_GETARG_POINTER(0); GISTENTRY *newentry = (GISTENTRY *) PG_GETARG_POINTER(1); float * result = (float *) PG_GETARG_POINTER(2); * moving_object *orig = (*origentry).key; make_now(orig); moving_object *new = (*origentry).key; make_now(new);* Is everything ok in this code ?? On Wed, Jan 13, 2010 at 8:42 PM, Sergej Galkin sergej.gal...@gmail.comwrote: Hello all, I am a student-magister and I'm writting my magister work. I realized gist index TPR tree - it is like a simple R tree but moving :) Everything is compiling ok, I creating table and index, but after whese code - DB is restarting :((( * * *set enable_seqscan = false select * from table_of_moving_objects where mov_obj ~ box '(0,0) (1,1)'* I can not understand why DB is restarting ? It is restarting when SQL begins use index :((( Can anybody help me , I would by appretiate every people who downloads my sources, try to deploy index and maybe solve where is the problem. Best regards, Sergej Galkin
[HACKERS] segmentation fault in function
I am realizing gist index and get a bug, that crashes DB. I' debugged my program as Robert(thanks !) advised me and I know which procedure crashed. *Datum gist_mov_consistent(PG_FUNCTION_ARGS)* *{* *GISTENTRY *entry = (GISTENTRY *)PG_GETARG_POINTER(0);* *BOX *query = PG_GETARG_BOX_P(1);* *StrategyNumber strategy = (StrategyNumber)PG_GETARG_UINT16(2);* ** *if (DatumGetMovP(entry-key) == NULL || query == NULL)* *PG_RETURN_BOOL(FALSE);* ** *PG_RETURN_BOOL(obj_contains(DatumGetMovP(entry-key), query));* *}* *int obj_contains(moving_object *a, BOX *b)* *{* ** *if (b-low.x a-x_low)* *return 0;* *if (b-low.y a-y_low)* *return 0;* *if (b-high.x a-x_high)* *return 0;* *if (b-high.y a-y_high)* *return 0;* *return 1;* *} ** Do you have any ideas ?** Best regards, Sergej Galkin *
[HACKERS] problem with gist index amdb utility
Hello all, With New Year ! I realized my own gist index, and now I want to debug it :) I want to use amdb program http://gist.cs.berkeley.edu/libgist-2.0/install.html But I have problem with installing it. When I running gmake cmdline It doesn't find iostream.h file :( and uses g++ (it is c++ compiler)). But I know that c++ compiler uses iostream files, and the are on my paths. Where can I get iosteam.h file ? Best regards, Sergej Galkin
[HACKERS] problem with realizing gist index
Hello all, I'm creating gist index for testing purpuses :) I created index element structure: typedef struct moving_object { double x_high; double y_high; double x_low; double y_low; time_t mov_time; double x_plus; double y_plus; double x_minus; double y_minus; } moving_object; And defined macros that return pointer to this structure: #define DatumGetMovP(x) ((moving_object*)DatumGetPointer(x)) but index interface function gives me error: Incompatible type in assignment Error line I style - bold Datum gist_mov_union(PG_FUNCTION_ARGS) { GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); int *sizep = (int *) PG_GETARG_POINTER(1); int num_obj; moving_object *pageunion, curr; num_obj = entryvec-n; pageunion = (moving_object*) palloc(sizeof(moving_object)); // THIS IS THE ERROR LINE * curr = DatumGetMovP(entryvec-vector[0].key);* make_now(curr); memcpy((void *) pageunion, (void *) curr, sizeof(moving_object)); for(int i = 1; i num_obj; i++) { curr = DatumGetMovP(entryvec-vector[i].key); make_now(curr); if (pageunion-x_high curr-x_high) pageunion-x_high = curr-x_high; if (pageunion-y_high curr-y_high) pageunion-y_high = curr-y_high; if (pageunion-x_low curr-x_low) pageunion-x_low = curr-x_low; if (pageunion-y_low curr-y_low) pageunion-y_low = curr-y_low; } *sizep = sizeof(moving_object); PG_RETURN_POINTER(pageunion); }* * Can anybody know what the problem ? I imagine that my defined function returns not pointer, but stucture (??) ? Best regards, Sergej Galkin
[HACKERS] about GiST indexes
Hello to all, I'm a young programmer student, and I would like to realize TPR-index on Postgresql system. Of course I want to use GiST template, rather than writing core :) I have some questions, and I would be very grateful if anybody answers my question. 1) where could I know the prototypes of such functions as union, pentaly and etc. And to read more detally than in PostgreSql documentation ? 2) How could I save in index structure index created time, and to get this value when I envoking such procedures such as union, penalty, pick split ? Best regards, Sergej Galkin
[HACKERS] Hello to all postgresql developers :)
Hello, I am Oracle developer for 2 years, and I have a magister work - to realize TPR index on RDBMS :) I desided to realize TPR index on PostgreSql RDBMS. I am really new programmer in C language. what I done 1 Installed Xubuntu on my computer. 2 build and installed PostgreSql. 3 Installed Anjuta on my computer. Can anybody advise what I need to do next. Grateful, Sergej