Using Postgresql 10.19 with KMyMoney 5.08

Jack ostroffjh at users.sourceforge.net
Thu Jan 20 23:05:24 GMT 2022


On 2022.01.20 17:49, Paul M. Foster via KMyMoney wrote:
> On Thu, 20 Jan 2022 16:11:36 -0500
> Jack via KMyMoney <kmymoney at kde.org> wrote:
> 
> > Hello Dave,
> >
> > First, please understand that using a SQL back end for KMyMoney will
> > NOT let two users access the database at the same time, or at least
> > no without almost certain loss of date.  The reason is that KMM does
> > not use the database in an active way.  Actions are just saved in
> > memory, not committed to the database in "real time."  KMM slurps in
> > the entire database when it starts (equivalent to reading a .kmy or
> > .xml file) and when you execute a Save, it saves all the in memory
> > data out to the database.  There is no way to allow concurrent
> > access.  This might conceivably change in the future, but that's the
> > way it is now.
> 
> I understand sucking a whole XML file in and committing changes when
> the user tells the program to save. (Of course, this explains why I've
> found KMM to be laggy.) But a SQL database? No one in their right mind
> would abuse a SQL database that way. I've been coding SQL databases  
> for
> twenty years, and I've never seen such a thing done. It defeats the
> whole purpose for SQL.
> 
> I haven't looked at KMM's code, but please tell me this is not really
> the way KMM handles SQL databases.
Yes, this is exactly how KMyMoney handles SQL backends.  Nobody claims  
it's a good way to do things, but (I assume) it was relatively easy to  
implement.  Making "proper" use of a relational database would involve  
essentially re-writing every bit of the program that retrieves,  
creates, updates, or deletes data.  In addition, all of it would have  
to be if/else depending on whether the back end was file or database.   
No matter how good an idea it is, there just does not exist the  
developer time which would be required.

The developers are well aware of all of this.  My understanding is that  
the sql stuff was added long after all the file based data storage was  
done, and that was long before I started using KMM.  At least it gives  
you the option of sql access to your data outside of running the  
program, so it's not totally useless.

Jack


More information about the KMyMoney mailing list