Bug 1342285 - postgresql fails to update databases due to postgis
Summary: postgresql fails to update databases due to postgis
Keywords:
Status: CLOSED DUPLICATE of bug 1055293
Alias: None
Product: Fedora
Classification: Fedora
Component: postgis
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-02 21:19 UTC by Rasmus Kaj
Modified: 2017-07-26 07:30 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-26 07:30:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rasmus Kaj 2016-06-02 21:19:38 UTC
Description of problem:

After updateing fedora from 23 to 24 beta, postgreql is updated from version 9.4 to version 9.5.  The command "postgresql-setup --upgrade" is supposed to update the database data to the new format, but fails because one of my databases uses postgis extensions.

Version-Release number of selected component (if applicable):

postgresql-server 9.5.3 1.fc24
postgis 2.2.1 3.fc24

How reproducible:

I don't know.

Steps to Reproduce:
1. Install postgresql-server and postgis on fedora 23.
2. Create a postgres database that uses postgis extension.
3. Update fedora to 24 beta. (Postgres is updated from 9.4 to 9.5).
4. Attempt to update data with postgresql-setup --upgrade

Actual results:

Update fails.

Expected results:

Successfull update, and beeing able to start the postgres service.

Additional info:

/var/lib/pgsql/pg_upgrade_dump_247358.log contains the following after the upgrade attempt:

command: "/usr/bin/pg_dump" --host "/var/lib/pgsql" --port 5432 --username "postgres" --schema-only --quote-all-identifiers --binary-upgrade --format=custom  --file="pg_upgrade_dump_247358.custom" "testgis" >> "pg_upgrade_dump_247358.log" 2>&1
pg_dump: [archiver (db)] query failed: ERROR:  could not access file "$libdir/postgis-2.1": No such file or directory
pg_dump: [archiver (db)] query was: SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef, a.attisdropped, a.attlen, a.attalign, a.attislocal, pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, array_to_string(a.attoptions, ', ') AS attoptions, CASE WHEN a.attcollation <> t.typcollation THEN a.attcollation ELSE 0 END AS attcollation, pg_catalog.array_to_string(ARRAY(SELECT pg_catalog.quote_ident(option_name) || ' ' || pg_catalog.quote_literal(option_value) FROM pg_catalog.pg_options_to_table(attfdwoptions) ORDER BY option_name), E',
    ') AS attfdwoptions FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid = t.oid WHERE a.attrelid = '248656'::pg_catalog.oid AND a.attnum > 0::pg_catalog.int2 ORDER BY a.attrelid, a.attnum

Comment 1 Pavel Raiskup 2016-06-03 05:03:37 UTC
Hi Rasmus, yes, upgrading with external plugins is not yet solved in postgresql
package.

You should either dump your DB on F23 and then restore (restoring with the
same set of, possibly updated, packages), or build the postgis agaist
'postgresql-upgrade' package (which is not that easy, because we don't have
'postgresql-upgrade-devel' package, yet (so you would have to rebuild
postgresql.spec, too.

IIRC, there has been some work done by Jozef Mlích?

Comment 2 Jozef Mlich 2016-06-03 06:18:57 UTC
My patches are attached into rhbz#1055293

Comment 3 Jan 2016-07-07 09:01:25 UTC
On my box helped to put content of Fedora 23 postgis rpm package into /usr/lib64/pgsql/postgresql-9.4 folder structure. Then manual steps for upgrade postgis from 2.1 to 2.2, after database is up and running.

Comment 4 Fedora End Of Life 2017-07-25 20:59:23 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Pavel Raiskup 2017-07-26 07:30:59 UTC

*** This bug has been marked as a duplicate of bug 1055293 ***


Note You need to log in before you can comment on or make changes to this bug.