Using an externally hosted postGreSQL as a gnu cash backend?

Geert Janssens geert.gnucash at kobaltwit.be
Tue Apr 12 06:40:31 EDT 2016


On Monday 11 April 2016 18:39:34 Michael Wagner wrote:
> On Mon, Apr 11, 2016 at 6:12 PM, Russell Mercer <rmercer206 at gmail.com>
> wrote:
> > Mike,
> > 
> > I think there are a couple of things at play here.
> > 
> > 1.  Using a database backend as opposed to the .xml file:  There are
> > noted issues with data consistency when using any backend storage
> > aside from the .xml.  The issues may not be major, and may only
> > apply in certain areas like business functions, but that has not
> > been quantified.  In short, there are known data integrity issues,
> > but their scope and severity are not known as they pertain to any
> > or all database backends.  That is one primary reason other people
> > on the list have recommended against using it.
> Is there a nickel tour of the data consistency issues? I did a quick
> web search and didn't find anything.

There's no real short list of known issues as most issues get fixed once they are discovered. 
However there is currently no guarantee there aren't any undiscovered issues. Our bugzilla 
database still lists some unhandled corner cases:
https://bugzilla.gnome.org/show_bug.cgi?id=741947
https://bugzilla.gnome.org/show_bug.cgi?id=742461
And I haven't found time yet to report another one I see in my test book:
Gnucash appears to forget the last execution time of scheduled transactions.

> 
> > 2.  Postgres data integrity, ACID support, etc.  I use Postgres on a
> > daily basis for my work, so I completely understand and agree that
> > it is a stellar RDBMS.  I do not, however, use it for Gnucash.  The
> > primary reason, is as mentioned in item 1.  There are unresolved
> > data integrity issues. The secondary reason is that at this time,
> > Gnucash has not been modified to take advantage of any database
> > functionality.  To your example, a partial transaction could not
> > happen in Gnucash, but for a different reason..  A transaction
> > between accounts in Gnucash does not involve a transaction between
> > 2 tables in Postgres.  This is because the data is essentially
> > stored in a flat file in Postgres.  It is loaded completely into
> > memory and all operations are done in memory with the results
> > written back to the database.
> > So, yes, while in theory, the RDBMS functionality of Postgres should
> > provide far superior data protection than the .xml file, in
> > practice, it is no better.
> 
> Sorry, I hope my explanation wasn't too tedious.
> 
> So gnucash doesn't update the PostGres DB using transaction semantics?
> That's interesting - not doubting you, that just seems odd.

It doesn't use transaction semantics in all cases:
https://bugzilla.gnome.org/show_bug.cgi?id=586902

Geert


More information about the gnucash-user mailing list