Opened 22 months ago

Closed 21 months ago

Last modified 21 months ago

#5354 closed defect (fixed)

ERROR: function "_postgis_join_selectivity" already exists with same argument types

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

Description

On my local dump restore test using:

make check RUNTESTFLAGS="-v --dumprestore"

, I am getting error

ERROR:  function "_postgis_join_selectivity" already exists with same argument types

full output is

Checking for shp2pgsql ... found
Checking for pgsql2shp ... found
Checking for raster2pgsql ... found
Creating database 'postgis_reg-3.4'
Loading unpackaged components from /projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis
Loading PostGIS into 'postgis_reg-3.4'
Loading Topology into 'postgis_reg-3.4'
Loading Raster into 'postgis_reg-3.4'
Loading SFCGAL into 'postgis_reg-3.4'
Dumping database 'postgis_reg-3.4'
Dropping db 'postgis_reg-3.4'
Creating db 'postgis_reg-3.4'
Loading unpackaged components from /projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis
Loading PostGIS into 'postgis_reg-3.4'
Loading Topology into 'postgis_reg-3.4'
Loading Raster into 'postgis_reg-3.4'
Loading SFCGAL into 'postgis_reg-3.4'
Restoring database 'postgis_reg-3.4' using postgis_restore.pl
Converting /projects/postgis/tmp/3.4.0dev_pg16_geos3.12_gdal3.4.3w64/postgis_reg-3.4.dump to ASCII on stdout...
  Reading list of functions to ignore...
  Writing manifest of things to read from dump file...
Setting postgis schema to public, as found in the dump  Writing ASCII to stdout...
Done.
 failed (Could not restore postgis_reg-3.4: /projects/postgis/tmp/3.4.0dev_pg16_geos3.12_gdal3.4.3w64/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:C:/ming64gcc81/projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis/topology.sql:377: NOTICE:  constraint "type_range" of domain "topology.topoelement" does not exist, skipping
psql:C:/ming64gcc81/projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis/topology.sql:675: NOTICE:  function topology.populate_topology_layer() does not exist, skipping
psql:C:/ming64gcc81/projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis/topology.sql:2927: 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
NOTICE:  schema "public" already exists, skipping
NOTICE:  schema "public" already exists, skipping
NOTICE:  schema "public" already exists, skipping
psql:C:/ming64gcc81/projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis/sfcgal.sql:182: WARNING:  there is no transaction in progress
psql:C:/ming64gcc81/projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis/sfcgal.sql:190: WARNING:  there is no transaction in progress
psql:C:/ming64gcc81/projects/postgis/postgis-git/regress/00-regress-install/share/contrib/postgis/sfcgal.sql:198: WARNING:  there is no transaction in progress
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 "_postgis_join_selectivity" already exists with same argument types
-----------------------------------------------------------------------------
Died at ./regress/run_test.pl line 399.
make: *** [regress/runtest.mk:24: check-regress] Error 3

Change History (5)

comment:1 by robe, 22 months ago

Gitlab is failing on this test too

https://gitlab.com/postgis/postgis/-/jobs/3926050433

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 "_postgis_join_selectivity" already exists with same argument types
-----------------------------------------------------------------------------
make: *** [/builds/postgis/postgis/regress/runtest.mk:24: check-regress] Error 3
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
1mERROR: Job failed: exit code 1

comment:2 by strk, 21 months ago

I can reproduce, with this possibly faster way:

make -C regress/core RUNTESTFLAGS="-v —dumprestore"

grep _postgis_join_selectivity utils/postgis_restore.pl # returns

FUNCTION _postgis_join_selectivity(regclass, text, regclass, text, )

which is probably the reason for this (note the ending comma)

comment:3 by Sandro Santilli <strk@…>, 21 months ago

Resolution: fixed
Status: newclosed

In 011a07f/git:

Trim trailing blanks from signature arguments

Closes #5354

comment:4 by strk, 21 months ago

For the record, according to gitlab-ci the bug was introduced with [8f0c476e/git]

comment:5 by strk, 21 months ago

This was fixed but a new one came up, filed as #5364

Note: See TracTickets for help on using tickets.