- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.6k
instead of upsert query, fallback to default on PSQL <= 9.4 #16572
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
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  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure lets do this
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 :-/)