| 1 | == Google Summer of Code 2021 == |
| 2 | |
| 3 | **Augment PostGIS 3.2 with GIST support added to PG14** |
| 4 | |
| 5 | ''Expected outcome'': Speed up GiST index building in PostGIS |
| 6 | ''Skills required'': C or willing to learn, ability to compile PostgreSQL code, ability to compile PostGIS code |
| 7 | ''Mentors'': Giuseppe Broccolo [https://github.com/glukhovn] |
| 8 | |
| 9 | ''Difficulty'': Medium |
| 10 | |
| 11 | ``Student Test'': |
| 12 | |
| 13 | 1. git clone PostGIS code from one of PostGIS repos - |
| 14 | 2. git clone code from PostgreSQL git repo (master branch) - |
| 15 | |
| 16 | Compile both. |
| 17 | |
| 18 | |
| 19 | ''Additional detail'': |
| 20 | |
| 21 | Recently this patch <https://commitfest.postgresql.org/29/2276/> which adds |
| 22 | more infrastructure to the GiST has been included in PG14. It should speed |
| 23 | up the build of a GiST index after some (fast) pre-sorting of the data |
| 24 | which needs to be indexed. Some tests for the PG's internal type point |
| 25 | (that uses Zsort as fast pre-sorting of the data) showed that the build is |
| 26 | up to 5 times faster. |
| 27 | |
| 28 | I'd like to study a possible implementation for PostGIS data types. |
| 29 | Basically, it would require to add this support function |
| 30 | <https://github.com/glukhovn/postgres/blob/225a49161fae9388651373d4beb8dcba99059339/src/include/access/gist.h#L37> |
| 31 | and this other one |
| 32 | <https://github.com/glukhovn/postgres/blob/225a49161fae9388651373d4beb8dcba99059339/src/include/access/gist.h#L38> |
| 33 | in the operator classes which use the GiST infrastructure (e.g. this one |
| 34 | <https://github.com/postgis/postgis/blob/8b13c3e2f8366d902dbf516ec17de09ae84361f4/postgis/postgis.sql.in#L781> |
| 35 | ). |
| 36 | |
| 37 | |