Closed I33Buckler closed 1 year ago
I don't think this is coming from NC or that db migration. I don't see where ag_catalog
could possibly be coming from within server
.
Are you using Apache AGE in your PostgreSQL server perhaps?
https://age.apache.org/age-manual/master/intro/setup.html
May be see if ag_catalog
listed in your postgresql search_path
? e.g. show search_path;
I don't think this is coming from NC or that db migration. I don't see where
ag_catalog
could possibly be coming from withinserver
.Are you using Apache AGE in your PostgreSQL server perhaps?
https://age.apache.org/age-manual/master/intro/setup.html
May be see if
ag_catalog
listed in your postgresqlsearch_path
? e.g.show search_path;
Yes I have APACHE AGE installed. However, it is not specified in the search path for the nextcloud database installation. show search_path for the nextcloud database returns "$user", public. It surprises me as well that the upgrade was identifying ag_catalog. I have databases in addition to the nextcloud database on the server.
You can see what that db migration in NC does here:
https://github.com/nextcloud/server/blob/stable27/core/Migrations/Version28000Date20230728104802.php
It just drops one legacy table and adds one new table. It's a really simple migration.
Sounds almost like the tables were inserted into the ag_catalog
schema at some point or something, and the dbuser in-use for NC doesn't have appropriate permissions to add/drop tables therein...
You can see what that db migration in NC does here:
https://github.com/nextcloud/server/blob/stable27/core/Migrations/Version28000Date20230728104802.php
It just drops one legacy table and adds one new table. It's a really simple migration.
Sounds almost like the tables were inserted into the
ag_catalog
schema at some point or something, and the dbuser in-use for NC doesn't have appropriate permissions to add/drop tables therein...
Interesting as 'select schema_name from information_schema.schemata;' on the nextcloud database returns public information_schema pg_catalog pg_toast
The nextcloud database is not the only database located on the server. The schema ag_catalog is to be found in the other database, though not in the nextcloud database. The ag_catalog schema located in the other database contains the following tables:
I don't know. It sounds like it's either a local config issue with your db user/roles/schemas or something with that extension. I don't know enough about AGE to even speculate about what that might be.
If AGE/ag_catalog
was truly isolated from your NC database then the NC updater wouldn't even know it existed.
I don't know. It sounds like it's either a local config issue with your db user/roles/schemas or something with that extension. I don't know enough about AGE to even speculate about what that might be.
If AGE/
ag_catalog
was truly isolated from your NC database then the NC updater wouldn't even know it existed.
Thanks. It is a mystery. Have tried everything I can find on interrogating the issue and cannot find anything that suggests that the NC database should be attempting to access the ag_catalog schema. Any suggestions on how to determine what could be causing the issue would be helpful.
Is quite a mystery. Noticed that in the postgres database I have dblink extension installed. This is described as 'connect to other PostgreSQL databases from within a database'. Figuring it could be an issue I decided to drop the extension and it prompted me with 'ERROR: schema "ag_catalog" does not exist'. I am beginning to think this is the culprit.
I'm also seeing this problem and I don't have dblink installed.
Hey any fix for this, same issue for me, could reproduce all the debugging steps the author undertook as well. But just for one of the tables I have. If I comment out the one column named tags
or even rename it to something like tags1
in the table then the migration runs fine. Is it some reserved keyword issue thats causing it although I dont have age installed in this db anyways so not sure why its an issue.
⚠️ This issue respects the following points: ⚠️
Bug description
In the process of upgrading my Nextcloud installation from Nextcloud 26.0.1.1 to 27.1.0 the upgrade failed with the following message.
Steps to reproduce
1.Ran the web updater. Installation failed with message above. 2.Tried running 'occ upgrade' with the following messages. Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Setting log level to debug Turned on maintenance mode Updating database schema Exception: Database error when running migration 28000Date20230728104802 for app core An exception occurred while executing a query: SQLSTATE[3F000]: Invalid schema name: 7 ERROR: schema "ag_catalog" does not exist Update failed Maintenance mode is kept active Resetting log level
Expected behavior
Expected the upgrade to succeed and any necessary changes applied by the process.
Installation method
None
Nextcloud Server version
26
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response