Visualize PostGIS index using Gevel in Postgres 9.6:
git clone git://sigaev.ru/gevel
cd gevel
git checkout bd8b8b031a8049a6e7c18c00946bfbd99d75d27f
USE_PGXS=1 make
sudo USE_PGXS=1 make install
psql -f /usr/share/postgresql/9.6/contrib/gevel.sql
psql
drop table if exists idx_vis;
create table idx_vis as (select level, replace(a::text, '2DF', '')::box2d::geometry as geom from gist_print('idx') as t(level int, valid bool, a box2df));
@salahelfarissi please check you're using latest development versions of Postgres or a matching version of gevel. since it's a dev tool you're expected to be able to handle the issues yourself.