Segmentation Fault on import in Postgres function
frugardc opened this issue · comments
I have a pretty simple function that returns a custom type of s2_cell. When calling the function, I get a seg fault on the database and it goes into recovery mode. This used to work, possibly newer versions of debian? Not sure how to proceed in testing. I have manually gone into a python console and not had any issues, but from within plpython3u I get the error. This is on the postgis docker images for FROM postgis/postgis:14-3.1 and also FROM postgis/postgis:13-3.1
`CREATE OR REPLACE FUNCTION public.cc_s2_intersection_cells_at_level(_geom geometry, lvl integer)
RETURNS SETOF s2_cell
LANGUAGE plpython3u
AS
import plpygis
`
I believe this might be caused by the somewhat common shapely segmentation faults that have something to do with geos versions.
For anyone else experiencing this, it is a shapely issue:
Thanks @frugardc for tracking down the issue. Hopefully, if someone else runs into this, they'll see your link to the solution.