Re: [QUESTION/PROPOSAL] loose quadtree in spgist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [QUESTION/PROPOSAL] loose quadtree in spgist
Дата
Msg-id 25932.1578514054@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [QUESTION/PROPOSAL] loose quadtree in spgist  (Peter Griggs <petergriggs33@gmail.com>)
Ответы Re: [QUESTION/PROPOSAL] loose quadtree in spgist
Список pgsql-hackers
Peter Griggs <petergriggs33@gmail.com> writes:
> In the getQuadrant function in the file src/backend/utils/adt/geo_spgist.c,
> I only added some elog statements to see the quadrant that a box is placed
> into using the current code. getQuadrant is called several times by the
> spg_box_quad_picksplit function, which is used when inserting into the
> quadtree. With this change, I can still build postgres but when I try to
> trigger the code, nothing gets printed to my logfile.

Perhaps you're looking in the wrong logfile.  elog(LOG) should definitely
produce output unless you're using very strange settings.

Another possibility is that the specific test case you're using doesn't
actually reach this function.  I'm not totally sure, but I think that
SPGiST might not call the datatype-specific choose or picksplit functions
until it's got more than one index page's worth of data.

>     elog(LOG, "BOX (minx, miny) = (%d, %d)\n", centroid->low.x, centroid->low.y);

A couple thoughts here:

* From memory, the x and y values of a BOX are float8, so don't you want
to use %g or %f instead of %d?

* You don't want to end an elog with \n, that'll just add extra blank
lines to the log.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: our checks for read-only queries are not great
Следующее
От: Robert Haas
Дата:
Сообщение: Re: our checks for read-only queries are not great