-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update Broken on PostgreSQL 10 #5930
Comments
I was able to get it working by changing https://github.com/nextcloud/3rdparty/blob/f5555fef8e80d8380efb44dc8b7622a1de573c15/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php#L292 However, this solution obviously isn't comprehensive enough for a pull request, as the pg_sequences table doesn't exist for PostgreSQL versions <10. I'm not very familiar with Doctrine, but it seems like the solution would be to check for the version, and then apply the right statement accordingly. |
This is already known: #5909 |
I had reviewed that issue, but it looks like a different issue altogether. This happens specifically because of changes to how PostgreSQL 10 handles sequence metadata. |
@justin-sleep Aah ok, sorry didn't read all the specifics. Thank you for reporting! |
Thanks for the report and testing with PGSQL 10 Beta 🚀 I think we should proceed as followed:
|
Still an issue in current doctrine, so this will be a bigger story: Docs only state 9, 9.2 and 9.4 explicitly: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/platforms.html#postgresql |
Postgres 10 was released: https://www.postgresql.org/about/news/1786/ |
Doctrine is now waiting for travis to add it as per doctrine/dbal#2868 ( travis-ci/travis-ci#8537 ) |
I just updated my nextcloud from 12.0.2 to 12.0.3, and hit this bug. Is there any way to work around it to get my nextcloud working again? |
I just downgraded back. |
I was able to get nextCloud 12.0.3 working with PostgreSQL 10 by using this patch from DBAL issue 2868 (doctrine/dbal#2868):
Would it be possible to integrate this patch into the nextCloud distribution? |
The biggest issue is we can not test this on travis atm, neither can doctrine, which is why the patch is not merged yet. My guess is we will not put this into 12, but maybe in 13. |
I can confirm that the patch from douglas works here on my Nextcloud 12.0.3 with PostgreSQL 10.0. Here is a "diff -u" for those who also want to try it out:
|
if you can port it to 12.0.x can be nice as pg10 is out since 1 month and some of us started to use it :) |
Hello. I just ported my NC installation to docker. I obviously started with the most recent stable versions, which are NC 12 and Postgres 10. Now I see that some apps (e.g. my bookmark apps) aren't working. This issue affects me already. As the container is immutable, please provide a workaround. Mounting the fixed file as volume? Something similar? Thanks in advance. |
For information, #5930 (comment) is still needed (and applies fine) for 12.0.4 |
@icewind1991 Could you have a look at this and apply the patch to our 3rdparty repo? |
#7210 adds pg10 support for nc13 |
Can we get this for nc12 as well? I had to rebuild a lot of containers to get it working. |
The problem is, that this is an upgrade of big part of a used library. So for now it looks like we will not be able to backport this to stable12 and only support Postgres 10 on Nextcloud 13+. |
Why do you want to stay on an old version? NC 13 brings so much improvements. I'd say one more reason to upgrade @JGjorgji :) |
@enoch85 @MorrisJobke |
You changed a major part of the overall stack - doing this should always involve testing before doing it and being able to properly roll back. We will support PostgreSQL 10 with Nextcloud 13. All previous Nextcloud versions will support the PostgreSQL 9 series. Sorry for those bad news, but there is just too much risk for breakage if we would backport this. |
Well i was hoping to avoid issues like this by waiting for nc13 to go stable. |
@MorrisJobke that's a fair comment, but please say something about the psql 10 incompatibility explicitly in the docs, for example here: While 13 may be around the corner, quite a few installations may well be on 12 for a while and don't realize the impending disaster awaiting when the database is upgraded. |
@MorrisJobke The Installation manual does not say "up to Postgres 9". It says:
Thank you very much for possibly ditching your users. @chy-causer thanks for you other link, you were even faster. ;-) |
Hi - sorry - this was not meant to trick some people into it. We just have forgotten to document it right after the PostgreSQL release. We will update the documentation accordingly. |
Sorry for the inconvenience. We updated the system requirements documentation accordingly and try to handle this better in the future. |
@MorrisJobke Mistakes are part of being human. Now how could you improve your workflow to avoid such an issue in the future? Usually a Kanban board helps to avoid forgetting steps like testing, documentation, reviews, etc., every time a change is made since you have to go through all the steps. |
According to PostgreSQL's 10 beta changelog
"A sequence relation now stores only the fields that can be modified by nextval(), that is last_value, log_cnt, and is_called. Other sequence properties, such as the starting value and increment, are kept in a corresponding row of the pg_sequence catalog. ALTER SEQUENCE updates are now fully transactional, implying that the sequence is locked until commit. The nextval() and setval() functions remain nontransactional.
The main incompatibility introduced by this change is that selecting from a sequence relation now returns only the three fields named above. To obtain the sequence's other properties, applications must look into pg_sequence. The new system view pg_sequences can also be used for this purpose; it provides column names that are more compatible with existing code."
Steps to reproduce
Expected behaviour
The upgrade should proceed.
Actual behaviour
I'll take a shot at fixing this later today.
The text was updated successfully, but these errors were encountered: