#4605 closed defect (fixed)
perl /usr/pgsql-12/share/contrib/postgis-3.0/postgis_restore.pl fails with error pg_restore: error: one of -d/--dbname and -f/--file must be specified
Reported by: | matti | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.0.1 |
Component: | postgis | Version: | 3.0.x |
Keywords: | Cc: |
Description
perl /usr/pgsql-12/share/contrib/postgis-3.0/postgis_restore.pl fails with error pg_restore: error: one of -d/—dbname and -f/—file must be specified The calls of pg_restore are missing options -f - I followed Hard upgrade according to the document https://postgis.net/docs/manual-3.0/postgis_installation.html#hard_upgrade I am using Red Hat Enterprise Linux 8 and RPM packages from postgresql.org repository.
Attachments (1)
Change History (11)
by , 5 years ago
Attachment: | postgis_restore.pl.patch added |
---|
comment:1 by , 5 years ago
Hi, any chance to test your patch against an earlier version of PostgreSQL ? It looks like you have been using PostgreSQL-12, which is pretty new. We want PostGIS 3.0 to support PostgreSQL from version 9.5 onward (PostGIS 2.5 should support also PostgreSQL 9.4)
See: https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
comment:2 by , 5 years ago
PostgreSQL 9.4 and 9.5 seem to support the -f - option and it is the default. https://www.postgresql.org/docs/9.4/app-pgrestore.html https://www.postgresql.org/docs/9.5/app-pgrestore.html
comment:4 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Thanks, I'll backport in all braches down to 2.5 then (first one to support PostgreSQL 12)
comment:7 by , 5 years ago
Row 148 should be
open( INPUT, "pg_restore -f - -L $manifest $dumpfile |") || die "$me:\tCan't run pg_restore\n";
not
open( INPUT, "pg_restore -L $manifest $dumpfile -f - |") || die "$me:\tCan't run pg_restore\n";
Patch to fix the bug