Database index `fs_storage_path_prefix` is not created with Postgresql
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
About PostgreSQL support.
Considering this line of code : https://github.com/nextcloud/server/blob/master/core/Command/Db/AddMissingIndices.php#L175
When installing Nextcloud, database index is not created with postgresql database to avoid any later issues (according this commit: https://github.com/nextcloud/server/commit/695326534c18749f36e9172e7b7345824213ee60
According to our research, the missing index is in the oc_filecache table.
With MySQL/Mariadb in database, the index is indeed created by Nextcloud and is called fs_storage_path_prefix. But he is
therefore not created with PostgreSQL
We think that performance issue could occur specially when Cronjob is running with huge database.
Could Nextcloud consider solving this annoying issue ?
The commit talks about extra parameters in dbal driver, could we have any explanations about ?
Expected behavior
Expect to have database index created.
Nextcloud Server version
25
Database engine version
PostgreSQL
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in core/Command/Db/AddMissingIndices.php around line 175 and review commit 695326534c18749f36e9172e7b7345824213ee60. Compare how the fs_storage_path_prefix index is handled for MySQL/MariaDB and PostgreSQL on the oc_filecache table. Done means PostgreSQL installations create the index without the later issues described by the commit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100