Using an externally hosted postGreSQL as a gnu cash backend?

Michael Wagner mikepwagner at mikepwagner.net
Mon Apr 11 14:20:20 EDT 2016


>> I have been using postGres for my data store for gnucash for some time
now,
>> and I am pretty happy with the results.

> It works well as a good local or local (or similarly reliable) network
> store, it is not intended as a server - client application in the way
> people that understand grown-up databases do thinngs.  It is just a
> backend.  All the actual data is held in local memory and written out
> and in as a whole.

> I repeat, postgres, mysql, sqlite, xml, it is just a store!  The fact
> that the store is a db is co-incidental.

My understanding was that gnucash enters transactions as database records,
and uses postgres to provide standard ACID DB properties record
strorage/retrieval. That's the reason that I chose the PostGres backend.

>     2) It would be nice to have gnucash installed on several of my
laptops
> and be able to get to the same data on an machine when I am traveling.

>> Have you thought this through?  I maintain a number of GnuCash installs
>> and keeping them all in line is a bigger deal than sharing the data file
>> or postgres db around, a partiular gnucash instance has other bits and
>> pieces that need to travel with it too.  Have you considered those?

Are the "other bits" things that change dynamically? Is there  a
description somewhere?

>> I got a number of "Why would anyone want to use posGres?", "gnucash
 doesn't
>> support a postGres back end!", and "You'll need to pay an experiences
>> postGres DBA $100,000 to set up a system like that", etc.

> you misrepresent the conversation ... a lot

Here's the actual quote from a year ago:

"If you're not an experienced Database Administrator for your server of
choice, you must either use a different backend, hire an experienced DBA
(expect to pay a 6-figure USD salary), or spend the several years of study
and practice required to gain the needed knowledge and experience."

That seems to be reasonably close to the description I posted  - and it
turned out not to be true. It probably took a couple of hours of reading
for me figure out how to install and set up PostGres on mu Ubuntu box, and
the vanilla PostGres settings all worked like a charm.

I only bring that up because I think that there is a lot of fear,
uncertainty and dread of the complexity of DBs in general and of PostGres
in particular.

That's a shame because DBs are a great tool for doing things a lot of
people really want to do. When you really want your data to be there, you
probably want your data in DB. A DB on top of a RAID 5 store is about as
close to "forever" as I am likely to get in my lifetime.

I don't have RAID 5 on my laptop (though I have thought about putting a
couple of SSDs in a box and installing freeBSD with ZFS so I at least get
mirroring). But it is very comforting to know what panics and power
failures cannot corrupt my gnu cash data.

That's not true for any of the flat file back ends (e.g., XML).

I have never done DBA work for a living, but my sense is the bulk of the
hard work of a DBA is really the architecture (how the tables are laid out,
etc). And the gnucash developers have done all the hard work.

I am probably more aware of this than most folks because I wrote and
maintained a tiny primitive (kernel access) DB engine for a good poriotn of
my career, so I learned about ACID properties by having to implement them.
:-)

In short, after a year of using gnucash with a PostGres back end, I think
it's very, very cool and give gnucash developers  major kudos for offering
that.

>From my (somewhat nerdy) perspective. from what I know of DB guarantees and
the ease of setting up PostGres, I am surprised everyone hasn't switched to
using the PostGres DB - a huge number if data reliability problem are
solved.

Mike

-- 
“The bassoon is one of my favorite instruments. It has a medieval aroma,
like the days when everything used to sound like that. Some people crave
baseball...I find this unfathomable, but I can easily understand why a
person could get excited about playing the bassoon.” - Frank Zappa


More information about the gnucash-user mailing list