#5348 closed defect (fixed)

Non-extension based dump-restore tests failing on new ST_ClusterIntersectingWin

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

Description

The new functions on https://github.com/postgis/postgis/pull/721

are triggering failure

when running

make check RUNTESTFLAGS="-v --dumprestore"

errors with:

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

So I presume postgis_restore.pl is not filtering this function out for some reason.

But work fine with

make check RUNTESTFLAGS="-v --extension--dumprestore"

I'm not seeing anything wrong with the availability checks in it.

I thought maybe postgis_restore.pl is not handling window functions, but if that is the case it should have chocked also on ST_ClusterDBScan and ST_ClusterKMeans.

Whatever the issue is I figure we can fix after its commited.

I'm changing cirrus to test against extension based install, which I think is more useful too because all fixes that would be done using schema quals I assume will only be fixed in extension based dump/restore

Change History (8)

comment:1 by Regina Obe <lr@…>, 14 months ago

In 9ea9b675/git:

Change Cirrus to do extension based dumprestore
Was doing script installed dumprestore check
which causes a failure in https://github.com/postgis/postgis/pull/721
Dumprestore Issue references #5348

comment:2 by strk, 14 months ago

When non-extension dumprestore fails it's probably the postgis_restore.pl script missing knowledge about a signature that should be stripped from the dump. It might be useful to generate part of that list, given our source knows about ANY signature we EVER released in a version we support soft-upgrade from, but those dumps could also come from earlier version, which is why the list we can generate is partial.

I'm pretty sure restoring a dump from very early releases is going to error out, btw, as we never had a bot testing those ancient dump restores (and current run_test.pl does not support testing restore-only either).

Anyway, for this ticket, check out how the signature is missing here: https://trac.osgeo.org/postgis/browser/git/utils/postgis_restore.pl.in#L1961

Remember to also add the COMMENT part

comment:3 by strk, 14 months ago

Status: newassigned

I just realized we are theoretically ALREADY generating the list of signatures to strip, via the update-restore Makefile rule under utils/Makefile.in — I will check to see why that one is failing and whether I broke it at some point

comment:4 by strk, 14 months ago

For the record: a big change to postgis_restore.pl.in was made in commit [3e176166f46f43c9704936013b330e0586f20844/git]

comment:5 by Sandro Santilli <strk@…>, 14 months ago

In 1a004f40/git:

Always update the postgis_restore.pl skip list

References #5348

comment:6 by Sandro Santilli <strk@…>, 14 months ago

In ac81ed5/git:

Analyze more files for generating the postgis_restore.pl skiplist

Rather than just the obsoleted objects, use the uninstall scripts
to also skip whatever is installed by *current* version of postgis.

Update the hardcoded skiplist to drop what we can generate

References #5348

comment:7 by strk, 14 months ago

Ok the problem is still not fixed because our generator generates this skip signature:

FUNCTION st_clusterwithinwin(geometry,distance double precision)

But pg_restore -l does not report function with argument names, just types, so the generator of signatures needs be improved to strip those argument names out, and the postgis_restore.pl too.

comment:8 by Sandro Santilli <strk@…>, 14 months ago

Resolution: fixed
Status: assignedclosed

In 418bc73/git:

Add ad-hoc script to create skip signatures for postgis_restore.pl

Update the hardcoded skiplist to drop more things we can now generate

Fixes #5348

Note: See TracTickets for help on using tickets.