Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#56302 - [nextcloud] Upgrade incompatible with postgres 10

Attached to Project: Community Packages
Opened by Maarten de Vries (de-vri-es) - Saturday, 11 November 2017, 20:58 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 12 February 2018, 20:32 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Nextcloud's upgrade procedure is not compatible with postgres 10, which is now used in Arch. An attempt to upgrade will result in an error, leaving the nextcloud instance unusable.

More information is available on github. A fix is mentioned in the comments but has not been commited yet:
https://github.com/doctrine/dbal/issues/2868

Manually applying the fix mentioned in the issue is a workaround.

Tested with nextcloud-12.0.3-3 and postgresql-10.1-1

To reproduce:
$ sudo -u nextcloud /usr/share/webapps/nextcloud/occ upgrade
<output snipped>
Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing 'SELECT min_value, increment_by FROM "oc_activity_activity_id_seq"':

SQLSTATE[42703]: Undefined column: 7 ERROR: column "min_value" does not exist
LINE 1: SELECT min_value, increment_by FROM "oc_activity_activity_id...
^
Update failed
This task depends upon

Closed by  Sergej Pupykin (sergej)
Monday, 12 February 2018, 20:32 GMT
Reason for closing:  Fixed
Comment by Max Pray (synthead) - Tuesday, 14 November 2017, 18:59 GMT
A proposed fix is in this PR, and it seems to work without issues:
https://github.com/doctrine/dbal/issues/2868#issuecomment-332119007

Edit: whoops, nevermind... looks like you linked the issue already!

Comment by Léo Grange (Kristaba) - Wednesday, 10 January 2018, 13:33 GMT
Indeed, this seem to be a small, yet very annoying issue...
Is there some feedback here about Nextcloud stability when using Postgres 10 (after applying the proposed patch to do the upgrade)?

If it is working and stable with Postgres 10, is it possible to include the patch in the Archlinux package?
The FreeBSD port/package added it some time ago, using exactly this patch:
https://svnweb.freebsd.org/ports/head/www/nextcloud/files/patch-3rdparty_doctrine_dbal_lib_Doctrine_DBAL_Schema_PostgreSqlSchemaManager.php?view=markup

However, the file integrity check is (quite obsiously) affected by patching a file and will display a warning:
https://github.com/nextcloud/server/issues/7549
The FreeBSD discussion is here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224393

I not able to figure what is the worst, between integrity warning to all users or package more or less broken for a few (like me) using Postgres.
In my situation, I am using some automatic deployment and multiple staging/testing VMs, so patching the Doctrine file is feasible but require more than just issuing a command on my laptop.
Comment by Eli Schwartz (eschwartz) - Wednesday, 10 January 2018, 14:18 GMT
Integrity warnings are perfectly okay IMO, as they are actually pretty annoying. They probably added those integrity checks for the sake of Windows users ;) as the preferred solution would obviously be to check the PGP signature of the source (which we do) and then have the freedom to modify the software (which we *should* do in order to backport critical usability issues).

Unless Nexcloud 13 is scheduled to be released *soon* we really should backport this fix now, rather than have a package with broken backends.
Comment by Max Pray (synthead) - Wednesday, 10 January 2018, 15:19 GMT
@Kristaba: I've been using Nextcloud with the PostgreSQL changes for a couple months without any issues.
Comment by Léo Grange (Kristaba) - Saturday, 10 February 2018, 17:00 GMT
@sergej With the new Nextcloud 13 upgrade, this issue should be solved.
I think you can close it if nobody is reporting an issue with Nextcloud 13 + Postgres 10.
Comment by Florian W. (w-flo) - Monday, 12 February 2018, 15:50 GMT
Confirming comment by Léo Grange, update to latest nextcloud package worked while having latest postgres (10) installed. Though for some reason the nextcloud post-update hook didn't execute, so I called the command from the hook (occ) manually. Not sure if that hook is supposed to run by itself, maybe it's a setting on my system.

Loading...