MariaDB or Postgresql

Hi.

I am wondering why Nexrcloud is recommending MariaDB over Postgresql. In fact I would not bat an eye if they switched to Postgresql as default recommended database engine. I say this not to start the almost religious debate between those in favour of MariaDB vs those in favour of Postgresql. However MariaDB is a fork of the MySQL project when it was still open source. MySQL has some build in flaws. Some of these - like how they made support for bigint - is sometimes causing troubles for nextcloud installations. Other stuff offered by Postgresql is much better support of multitenant SQL cluster in load balancing and caching of SQL for not-yet replicated data. Features which mariaDB needs a Galea cluster in front to solve. Add the powerfull support for nosql like JSON datastorage aswell as both XML and JSON syntax support.

I was just wondering if switching to Postgresql recommendation instead of MariaDB, would canabalize some on the enterprise subscriptions, as high availability would suddently be much easier to obtain without the need for enterprise license?

You can install postgresql anytime you want. There is no secret to it.

No, because those customers don’t want to be responsible their own infrastructure, whether it runs postgres or mariadb and a galera cluster :heart:

There are some apps such as two factor admin support that dropped support for postgres. Not saying it’s a reason for the recommendation, but it’s something to consider if you want certain apps.

Can please you confirm which apps are impacted besides Two Factor Admin.

Crazy, dug into this and found this closed pull request linked from this discussion

I know I can migrate to it anytime I want. This is not the reason I starts this debate. I starts this debate as the Nextcloud platform is now enterprise grade, and is comming with so many complex - even for the core - features, that the most stable and complex-enabler is Postgresql over MariaDB. I loves MariaDB simply because I have been onboard since 2002 while it was MySQL, and has been the database vendor I have the most experience with. I even use it professionally todfay in an intelligence setup

If you want to improve postgres documentation then please do so by contributing a pull request. Link it to the forum for feedback. That would be fantastic.

2 Likes

I don’t know any others off the top of my head, but I was disappointed to find out this one in particular doesn’t work with AIO because of Postgres.

If you’re a paying Enterprise customer, I’m sure they will try to help you find an adequate solution to administer your users 2FA devices and they even might provide a solution for the non working 2FA admin app. Or more likely you’ll tie it to an already existing authentication soultion anyways.

If you are a home or small business user, you will hardly run into any serious issues with both databases, and if in doubt, just use what’s recommended. Performance differences between MariaDB and Postgresql are negligible on small instances.

Also home users or small businesses don’t typically run HA setups. For them it would make way more sense, if there is any money for a second server at all, to invest it in a decent local backup solution. :wink:

I didn’t know this till now… still have to learn a lot…

how could it happen an app existing int the official store doesn’t support officially supported back-end DB?

in my eyes there must be clear policy - all apps must support official baseline:

  • all supported databases
  • all supported PHP versions
  • all supported storage backends
  • etc… remaining important prerequisites for all supported NC major versions

in case the app doesn’t follow the guideline it should disappear from the appstore!

must apps follow requirements as above?

  • yes
  • no

0 voters

2 Likes

Actually it is up to the maintainer to decide which databases, PHP versions and Co. They support. It is not in the guidelines of the store to be compatible with all that.

4 Likes

You know… I had sort of a similar reaction, finding it odd that this one app didn’t work on AIO, despite being mentioned specifically in the documentation. It seemed to me that any app mentioned in the docs should work on any official distro, right? I won’t get into details, but what I was told in response did not meet expectations at all.

Anyway, I think this is a fringe case. That’s the only one I’ve run into myself that had a DB compatibility issue. Maybe it’s not too big of a deal.

No, but I think it should be clearly stated in the description, if there are any sepcial requirements, that differ from the ones stated in the Nextcloud documentation. Ideally, you would even be able to filter by requirements like PHP version, database, Nextcloud version etc.

On the other hand, this really seems to be an exception. I have never heard of any other app that requires a specific database. Although there is at least one app, (I think it’s the Passwords app), that requires a higher PHP version than the minimum version listed in the official Nextcloud Server Requirements.

3 Likes

this should not happen as well. Pushing toward higher PHP version is good in general but there should be no exception in both directions - each dependency supported by the base must be supported by the apps. Otherwise it becomes a nightmare to setup and support a support a system with external apps.

2 Likes

I would support this for apps labelled as official. For independent app developers, they often just build an app for themselves and share it with the community. They do some testing based on their setup, if you force them to test all the imaginable combinations of different php/database whatever version, they just won’t publish it. (And there is oracle support but just for enterprise customers, that is not testable for standard-users).

For me the better way would be to get some support from the community, however some developer with existing experience in the Nextcloud environment, that is difficult. Perhaps a hackathon or something like that could be a good occasion to tackle such issues…

4 Likes

I see you doubts especially with Oracle… the choice is between two options:

  • developers pain
  • user/admin pain

my suggestion would result in a first option current situation is the seconds option. while both have it pro and contra I still prefer to establish formal requirements for the apps to support major system prerequisites. The dev is the responsible actor and the only party who change something… otherwise the admin must wonder why the app doesn’t work for some reason (maybe in only one of multiple installations).

In case the dev is not willing to support 3 PHP versions and 3 databases I likely prefer not to have such app in the store. My preference is definitely towards few good apps rather lot of broken. Maybe this is a non-issue at all, as we only know 2 apps which are such bad to miss this simple criteria… but in Nextcloud we have in general far too many good unfinished ideas. Start with an official parts like E2E encryption or mail app - I’m pretty sure E2E still lacks basic functionality like sharing “introduced” 2016 (?) and mail app despite heavy advertising and likely many development efforts still can’t compare with Rainloop/Snappymail…

Your never know the motivation of the dev but it’s really easy to start a project, implement some cool functionality, cover own requirements and forget it. Serious developer must be prepared to add functionality he doesn’t require and maybe doesn’t like just to make users happy.

There are lot of examples when it works good or bad… the question what is the right way for Nextcloud. In may exes the project has grown out of the the “let’s code something cool” phase into the “we want play in the same league as Microsoft and Google” as with such positions another user base is attracted and expectation rise with them…

In a “business” world - doesn’t need to be enterprise - start with a school or NGO - in my eyes it’s no-go to ship an app which doesn’t support everything the base system does…

Yes. This is excactly where I am at and why I opened this thread.

If you need guarantees you’l have to stick with the stuff that is labled as “official” and you’ll probaly have to buy support at some point, or hire more IT staff. Either way it’s gonna cost you money. That’s just how the world works as of 2023. Maybe at some point in time we’re going to live in some kind of Star Trek utopia. But this time is not now :wink:

You’re looking for a way to easily bulid a HA setup, which you probably don’t need, if you’re in a position, where you cannot afford buying support. Small and medium businesses <500 employees, usually don’t need HA and database clusters. Most of them would be better off to invest their tight budget in a proper backup solution, or as much as I hate to say it, in SAAS offers. If smaller companies are looking for ways to host enterprise grade solutions on prem, but don’t want to spend the money to do it right, it’s usually only a matter of time before they will eventually loose data.

Or to put it simply, if your main motive for hosting things on-premise is to save money, it will end up in a disaster sooner or later.

No. I have a HA setup already, using Galea cluster. Better support for HA is just one of the baked in pros of Postgresql. It is not the point of my comments.

Nextcloud is both an open source community driven project, driven mainly forward by the single largest contributor: Nextcloud GmbH, which makes a Living from enterprise customers. Then there is also all the app developers.

Nextcloud core is driven then by developers getting paid to serve enterprise customers, hence stability, security, enterprise enablement, HA and so on, is what drives this.
As such Nextcloud is enterprise grade Open Source software. It makes sense to then make a decision as to which primary database engine is the renommeded based on an enterprise grade perspective. Here Postgresql just comes out on top on so many parameters.

It is supported, but not explicitly recommended. But no sane IT manager will implement this in an enterprise without extensive testing and / or first contacting Nextcloud GmbH or some service provider who has experience with such large setups. So who cares if it is in the recommend database in their docs or not. :wink:

But if I understand it correctly, the Nextcloud developers and Nextcloud GmbH is recommending MariaDB mainly because they have less experience and expertise with Posgressql than with MariaDB. This is the impression I got from searching around GitHub and the forum. I don’t have a link to an official statement though. If you need an official statetement, I would recommend to contact them and ask them directly…

I am in no position to state or know or even suggest, which database system is most comfortable for the Nextcloud GmbH developers. I am looking on this from an easier to manage and support perspective - for both enterprise and community. MariaDB is great. As a database engine we do use it in a load balanced setup as part of a bussiness intelligense solution at work (and not for Nextxloud) so I know for a fact that it can also work in an enterprise and High performance environment. However the amount of dependencies to 3rd party components needed for this, is rather silly, compared to using Postgresql for the same purpose.

As I started this thread with, it was not to become a battle between MariaDB fans vs Postgresql fans, but rather a question about where Nextcloud is already and what it moves towards vs would best - natively - support it and the type of users and environments it is indtalled in. There is so much talk about AI, ML and other rather advanced things aswell.

Never the less then I am thrilled to see how many is adding to this experiment of dissending-on-purpose, the current state of things. If not done, you never get a new perspective.