[GNC-dev] lock on MariaDb database

Bregt - ICTgroup.be bregt at ictgroup.be
Mon Mar 22 11:31:15 EDT 2021


I recently installed GnuCash 4.2 on an Ubuntu 20.04. I linked my data to
a database on an instance of a MariaDb server on the same host. All data
gets stored in the database as I expect, so far so good.

Last week I put up a master/master replication configuration between the
MariaDb server and a second MariaDb server on another host in my local
network, in order to have a backup (and some form of multi-user access,
but that's not what it's about right now). Replication works as
expected, so far so good.

I did notice however, that the lock on the database (the entry in table
gnclock) is set upon launching GnuCash, but is not deleted upon closing
GnuCash. This results in GnuCash asking me if I want to 'open anyway'
(ie overwrite the entry in gnclock) every time I launch GnuCash. Even
when detaching the primary MariaDb host from the local network, this
problem remains.

I did tamper with the database in order to test the replication: I
created a dummy table and upon seeing it getting replicated to my second
server, I deleted that table (and it got deleted on the replication
server too).

Anyone has an idea or a hint on how to get GnuCash to delete the entry
in table gnclock upon closing (as should happen and indeed happened
before configuring the replication)? Would my adding/deleting the dummy
table for the replication test have anything to do with this issue?

Kind regards,


More information about the gnucash-devel mailing list