instead of upsert query, fallback to default on PSQL <= 9.4 #16572
instead of upsert query, fallback to default on PSQL <= 9.4 #16572
Conversation
|
😞 I think a lot of people were happy about less log spam. Would it be possible to change that only for Nextcloud 16? |
|
Well we should just make sure in this case it does not unnecessarily log it? |
It's a Postgres log. Nothing we control. We just catch the exception that the Postgres connection is throwing then and handle it properly. Unfortunately there is then still an entry in the Postgres logs. |
|
So, what we could do instead then is to keep the upsert, but somewhere detect the Postgres version before and fall back to the old method if we're below 9.5. Does that make sense? |
|
I would also go down the road that @blizzz suggested. Add an adapter for Postgres < 9.5 and use the new upsert only for Postgres > 9.5. As long as we have access to that version information this should be a reasonable solution. |
da196bd to
077e53c
Compare
|
Changed it as discussed, yet need to test against an old Pg tomorrow. |
|
This way we introduce a additional query for a static information. I would suggest to add a config variable |
because there is no upsert yet Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
077e53c to
d040954
Compare
|
/backport to stable16 |
|
backport to stable16 in #16814 |
… in favor of the generic way
fixes #15613 properly, overrides #16461 and supersedes #16569 (Messy affair, could have been solved more elegantly, sorry :-/)