#5415 closed defect (fixed)

dump restore failure function "st_largestemptycircle" already exists with same argument types

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 3.4.0
Component: build Version: 3.3.x
Keywords: Cc:

Description (last modified by robe)

Seeing this error on gitlab dump/restore with new function https://gitlab.com/postgis/postgis/-/jobs/4562298119#L4500

Died at /builds/postgis/postgis/regress/run_test.pl line 426.
 failed (Could not restore postgis_reg-3.4: /tmp/pgis_reg/regress_log)
-----------------------------------------------------------------------------
NOTICE:  schema "public" already exists, skipping
NOTICE:  schema "public" already exists, skipping
NOTICE:  schema "public" already exists, skipping
NOTICE:  schema "public" already exists, skipping
psql:/tmp/build/regress/00-regress-install/share/contrib/postgis/topology.sql:388: NOTICE:  constraint "type_range" of domain "topology.topoelement" does not exist, skipping
psql:/tmp/build/regress/00-regress-install/share/contrib/postgis/topology.sql:686: NOTICE:  function topology.populate_topology_layer() does not exist, skipping
psql:/tmp/build/regress/00-regress-install/share/contrib/postgis/topology.sql:2938: NOTICE:  aggregate topology.topoelementarray_agg(topology.topoelement) does not exist, skipping
                     addtosearchpath                     
---------------------------------------------------------
 topology has been added to end of database search_path 
(1 row)
NOTICE:  schema "public" already exists, skipping
SET
ALTER TABLE
ALTER TABLE
ALTER TABLE
SELECT 8500
DELETE 8500
SET
SET
SET
SET
SET
 set_config 
------------
 
(1 row)
SET
SET
SET
SET
ERROR:  function "st_largestemptycircle" already exists with same argument types
-----------------------------------------------------------------------------
make: *** [/builds/postgis/postgis/regress/runtest.mk:24: check-regress] Error 3

Change History (7)

comment:1 by robe, 13 months ago

Description: modified (diff)

comment:2 by strk, 13 months ago

Status: newassigned

It looks like utils/create_skip_signatures.pl is failing to properly handle OUT named parameters, as this is what it generates:

COMMENT FUNCTION st_largestemptycircle(geom geometry, tolerance double precision, boundary geometry, out center geometry, out nearest geometry, out radius double precision)
FUNCTION st_largestemptycircle(geometry, double precision, geometry, center geometry, nearest geometry, radius double precision)

I'm on it

comment:3 by strk, 13 months ago

The manifest printed by pg_restore completely drops the OUT parameters:

529; 1255 27730160 FUNCTION public st_largestemptycircle(public.geometry, double precision, public.geometry) strk

comment:4 by strk, 13 months ago

Note that the comment signature retains the OUT params:

4108; 0 0 COMMENT public FUNCTION st_largestemptycircle(geom public.geometry, tolerance double precision, boundary public.geometry, OUT center public.geometry, OUT nearest public.geometry, OUT radius double precision) strk

comment:5 by strk, 13 months ago

For completion, INOUT parameters are retained in both COMMENT and FUNCTION manifest lines:

954; 1255 27730782 FUNCTION public testinout(double precision) strk
4245; 0 0 COMMENT public FUNCTION testinout(INOUT "inout" double precision) strk

comment:7 by Sandro Santilli <strk@…>, 13 months ago

Resolution: fixed
Status: assignedclosed

In dc5503e5/git:

Fix skip signature of function with out and inout parameters

Fixes restore of PostGIS dumps from 3.4.0 (ST_LargestEmptyCircle).
Removes needlessly hardcoded signatures in postgis_restore.pl.in.
Adds postgis_restore.pl code duplication check and clean targets.

Closes #5415

Note: See TracTickets for help on using tickets.