Re: amcheck (B-Tree integrity checking tool)

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: amcheck (B-Tree integrity checking tool)
Дата
Msg-id CAM3SWZQxPnH7ngCrqNANcHstKSBSG_ob1bTFdOQt1w=VENKv=Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: amcheck (B-Tree integrity checking tool)  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: amcheck (B-Tree integrity checking tool)  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Sat, Mar 12, 2016 at 12:38 PM, Peter Geoghegan <pg@heroku.com> wrote:
> Only insofar as it helps diagnose the underlying issue, when it is a
> more subtle issue. Actually fixing the index is almost certainly a
> REINDEX. Once you're into the messy business of diagnosing a
> problematic opclass, you have to be an expert, and tweaking amcheck
> for your requirements (i.e. rebuilding from source) becomes
> reasonable. Part of the reason that the code is so heavily commented
> is to make it hackable, because I do not feel optimistic that I can
> get an expert-orientated interface right, but I still want to make the
> tool as useful as possible to experts.

Heroku began a selective roll-out of amcheck yesterday. amcheck
already found a bug in the PostGiS Geography B-Tree opclass:

https://github.com/postgis/postgis/blob/svn-trunk/postgis/geography_btree.c#L260

The issue is not that PG_RETURN_BOOL() is used here (that's just a
problem of style). Rather, the issue is that the Geography opclass
support function 1 considers an "empty geometry" equal to all other
possible values (values not limited to other empty geometries). This
breaks the transitive law, which nbtree requires and relies on.

I'll go report this to the PostGiS people.

-- 
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Marginal cleanup in regex code: remove typedef "celt"
Следующее
От: Bruce Momjian
Дата:
Сообщение: Making pg_hba.conf case-insensitive