file locking for single user, multiple gnucash?

incoming-gnucash at sabot.com incoming-gnucash at sabot.com
Mon May 12 17:07:59 EDT 2014


I understand how file locking works when you have two different users
that are each trying to open the same gnucash file: the first to open
the file succeeds and place a lock file in the directory, and second
is told it is busy and offered read-only access.  Everything works
great.  I'd like to ask about a different scenario.

I'm a single user, and I have two gnucash files I want to work with.
One is personal, one is business.  As far as I can tell, I can go to a
shell and run gnucash on the personal file, and then go to a different
shell and run gnucash on the other file, and I get no complaints: both
open up fine.  

Ideally, I'd like to use the files like that: open both up, and leave
them up all day, using and clicking save as convenient.  This would
be more convenient and faster than repeatedly closing/browsing to the
other file/re-opening.

However, I think this might be a bad idea: the two runs seem to be
sharing access to some files in the .gnucash directory though I'm not
100% sure what they all are:

  1. saved-reports-2.4: my custom reports, updated only if I change a report
  
  2. qif-accounts-map:  updated after I do a qif import?
  
  3. accelerator-map:   custom keyboard shortcuts, mine is empty but has a
                        new timestamp so update might not be under my control
  
  4. stylesheets-2.0:   ?
  
  5. expressions-2.0:   ?
  
  6. .gnucash/books/*.gcm: files about my tab setup, based on gnucash file
                           name so those seem safe/no collision possible.
  
  7. Others?

For 1 and 2, likely I can control my usage well enough to not get into
trouble, only having one open if I ever want to save some reports or
do qif importing.  And if I screw up, hopefully the symptom would be
whichever gnucash saved out last would be saving its stale view of the
world (plus its change), overwriting the newer file system copy left
by the other copy of gnucash.  The file would not be corrupt; I would
just be missing some newish custom report or qif mapping.

For the others, I'm not clear on what might happen!

So in summation: is it safe to be a single user and open up two
different gnucash files at the same time?

Thanks.

--gary


More information about the gnucash-user mailing list