Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALTER EXTENSION fails #54

Closed
Krysztophe opened this issue Nov 30, 2020 · 5 comments
Closed

ALTER EXTENSION fails #54

Krysztophe opened this issue Nov 30, 2020 · 5 comments

Comments

@Krysztophe
Copy link

There are no such scripts as ''hypopg--1.1.3-1.1.4.sql'', so an ALTER UPDATE fails:

powa=# ALTER EXTENSION hypopg UPDATE;
ERROR: extension "hypopg" has no update path from version "1.1.3" to version "1.1.4"

The extension can be dropped and reinstalled, but this is disturbing for a user.

Are dummy scripts an option in the future?

@rjuju rjuju self-assigned this Nov 30, 2020
@rjuju rjuju added the question label Nov 30, 2020
@rjuju
Copy link
Member

rjuju commented Nov 30, 2020

Hello,

This is intended. As hypopg doesn't create any table and doesn't store any data outside a transaction's local memory, there's no need to create upgrade scripts. You can simply drop and create the extension to get the new versions.

Are dummy scripts an option in the future?

I'm afraid no, as it'll double the work required for the SQL wrappers, on top of adding possibility of forgetting something in one of the scripts. For the record, there are third-party extensions (e.g. plpgslq_check) that have the same approach so it shouldn't be so surprising for users. I can add some documentation to point out that an upgrade is actually a drop/create.

@Krysztophe
Copy link
Author

OK, we can live with that.

Yes, a bit of documentation would be nice.

@rjuju
Copy link
Member

rjuju commented Dec 14, 2020

Done in 82900d1!

@rjuju rjuju closed this as completed Dec 14, 2020
@rjuju rjuju reopened this Jul 24, 2021
@rjuju
Copy link
Member

rjuju commented Jul 24, 2021

@Krysztophe now that I have a tool to validate extension upgrade scripts, I'm willing to reconsider this for both this extension and pg_qualstat!

I'll keep this issue opened for now as a reminder to provide an upgrade script next time.

@rjuju
Copy link
Member

rjuju commented Aug 2, 2021

I just pushed 30c4f2a to start working on 1.3.2, which includes an upgrade script! I'm closing this issue as following version should follow the same pattern.

@rjuju rjuju closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants