Postgresql support #12437
Replies: 7 comments 2 replies
-
Edit: My $0.02 I cannot wait for the day we have postgres support, I personally want to deploy sites to DO/Linode with a managed postgres instance so I don't have to think about db backups. Right now we lack the capacity internally to support another database engine on top of SQL Server and SQLite (esp maintenance and testing). In the future with a little schema tidy up and some additional tests I hope this could be part of the Umbraco codebase. But for now perhaps a community maintained implemenation is possible? for v10 it's easier than ever to add additional databases just by adding a package ref (that's how it works now for all of our supported engines) The Umbraco.Cms.Persistence.Sqlite project would be a good starting point for inspiration especially given that SQLite syntax is inspired by postgres. Edit: And for distributed locking setup etc that would presumably be much more like Umbraco.Cms.Persistence.SqlServer. |
Beta Was this translation helpful? Give feedback.
-
I've successfully built a persistence provider for PostgreSQL. I was able to start the system and get tables created and data initialized. What I had to do was:
There are surely places left where there needs to be parameters passed instead of above mentioned issue with boolean columns. Those should be easy fixes though. As for the distributed locking, I've copied from Sql Server implementation and done some adjustments. Someone more knowledgable should have a look at it. You can try it out using this repo: https://github.com/dlidstrom/Umbraco-CMS/tree/persistence-postgres Let me know what you think! |
Beta Was this translation helpful? Give feedback.
-
This is awesome! I will try it asap. |
Beta Was this translation helpful? Give feedback.
-
I just pushed a new commit that fixes a whole bunch of use cases that I hadn't been able to try yet. A lot of Umbraco works fine! |
Beta Was this translation helpful? Give feedback.
-
Wow this does look very interesting @dlidstrom! Not trying to ruin your party, but at the moment we don't have the resources to take in and maintain another data layer. I was wondering if we would be able to figure out a way to make this a plugin provider instead. I had a quick look and I see this work unfortunately requires a lot of changes to, as you say, mixed case scenarios so it's touching a lot of the core code. To be fair, I don't think lowercasing all our queries should be a problem, at least for SQL / SQLite but it would be if someone ever wanted to build an external MySQL provider. Additionally, making such large changes in the database schema is a little difficult for 2 reasons:
However, it seems like the biggest, required changes are changing the So mostly I'm here to ask: what needs to be done in the core of Umbraco to be able to support you in being able to make a pluggable database provider? |
Beta Was this translation helpful? Give feedback.
-
Hi Sebastiaan, thanks for weighing in. I did get the message that there can not be a The issues I've identified are these:
With these issues fixed (which shouldn't touch much of Umbraco codebase) it I will set out to prove or disprove this theory next. So, while this work can be done in a separate library, as has been suggested, it What would you say about this (wild?) idea? Let new persistence implementations Thank you for your consideration. |
Beta Was this translation helpful? Give feedback.
-
Just to let you know, for everyone who follows this discussion, that I am now able to run Umbraco with PostgreSQL on my mac having done minimal changes to core Umbraco itself. Apart from some small prerequisite change, everything is contained in the new persistence implementation. A big thanks to the amazing forethought of both Umbraco and NPoco developers to put in extension points for all overrides that were needed! |
Beta Was this translation helpful? Give feedback.
-
Hi
Considering the move to .NET5(+), is there any plans to also introduce a more Linux (and perhaps Cloud) friendly database?
Is the Umbraco team willing to take ownership of a potential pull request adding support for postgres?
Beta Was this translation helpful? Give feedback.
All reactions