ogr2ogr with missing geometries crashes postgresql with segmentation fault
Daryl Herzmann
akrherz at gmail.com
Sat Dec 13 05:38:31 PST 2025
On Fri, Dec 12, 2025 at 7:20 PM Jorge Gustavo Rocha <jgr at di.uminho.pt> wrote:
>
> Hi,
>
> TL;DR
>
> A GIST index on a EMPTY POLYGON (encoded by GDAL) crashes postgresql
> with segmentation fault.
>
> drop table if exists fault;
> create table fault (fid integer, geom geometry(Polygon,5015));
> INSERT INTO fault (fid, geom) VALUES (1,
> '0103000020971300000100000000000000'::GEOMETRY);
> CREATE INDEX fault_geom_index ON fault USING GIST (geom);
FWIW, this reproducer crashed my Postgresql 18 + postgis 3.6.0 (both
from PGDG) + Alma Linux 9 as well.
...
INSERT 0 1
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.
!?>
!?> quit
$ psql
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432"
failed: FATAL: the database system is in recovery mode
daryl
More information about the postgis-users
mailing list