Skip to content

Unable to upgrade from v1.5.0 to v1.6.0 #2257

Closed

Description

@crdv7

Describe the bug
The Makefile fails to install age--1.5.0--1.6.0.sql to the share/extension directory, postgresql couldn't find the upgrade sql.
How are you accessing AGE (Command line, driver, etc.)?
Using psql Command line
What data setup do we need to do?
N/A - No specific data setup required, this is a build/installation issue.
What is the necessary configuration info needed?

  • PostgreSQL 16
  • AGE v1.5.0 installed
  • AGE v1.6.0 upgrade package prepared
    What is the command that caused the error?
ALTER EXTENSION age UPDATE TO '1.6.0';
ERROR:  extension "age" has no update path from version "1.5.0" to version "1.6.0".

Expected behavior
The ALTER EXTENSION age UPDATE TO '1.6.0' command should successfully
execute the age--1.5.0--1.6.0.sql migration script and upgrade AGE to v1.6.0.
Environment (please complete the following information):

  • Version: PG16, AGE1.5.0
    Additional context
    Root Cause: The Makefile (line 20) only includes age--1.6.0.sql in the age_sql variable.
    Solution: Add the upgrade script to the Makefile:
    Change:
    age_sql = age--1.6.0.sql
    To:
    age_sql = age--1.6.0.sql
    age--1.5.0--1.6.0.sql

Activity

  1. added
    bug
    on Dec 3, 2025
  2. jrgemignani commented on Dec 3, 2025

    @jrgemignani
    Contributor

    @crdv7 This is by design. You need to manually copy the file over.

  3. crdv7 commented on Dec 3, 2025

    @crdv7
    ContributorAuthor

    @crdv7 This is by design. You need to manually copy the file over.

    Thanks for the quick reply! I now see this is intentional. That said, I’m curious about the reasoning behind it—manually copying the file can be a bit cumbersome in production builds where automation is key. Would you mind sharing the rationale for going with this approach?

  4. jrgemignani commented on Dec 3, 2025

    @jrgemignani
    Contributor

    @crdv7 You can still automate the copying of a file, if you like :) The reasoning was that upgrading a version takes care and is best left to say, a dba, as there may be issues that need to be addressed prior to upgrading.

    Take, for example, the current upgrade script -

    --
    -- WARNING!
    --
    -- Since there are modifications to agtype gin operators, users who are
    -- upgrading will have to drop the gin indexes before running this script and
    -- recreate them afterwards.
    --
    -- As always, please backup your database prior to any upgrade.
    --
    -- WARNING!
    --
    
  5. crdv7 commented on Dec 4, 2025

    @crdv7
    ContributorAuthor

    @crdv7 You can still automate the copying of a file, if you like :) The reasoning was that upgrading a version takes care and is best left to say, a dba, as there may be issues that need to be addressed prior to upgrading.

    Take, for example, the current upgrade script -

    --
    -- WARNING!
    --
    -- Since there are modifications to agtype gin operators, users who are
    -- upgrading will have to drop the gin indexes before running this script and
    -- recreate them afterwards.
    --
    -- As always, please backup your database prior to any upgrade.
    --
    -- WARNING!
    --
    

    Thank you for your response. I now understand that this is designed as a kind of mandatory alert mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions