backend-sql, network hacks

Christopher Browne cbbrowne@localhost.brownes.org
Thu, 25 Jan 2001 08:21:35 -0600


On Fri, 19 Jan 2001 14:06:35 CST, the world broke into rejoicing as
linas@linas.org  said:
> It's been rumoured that David Merrill said:
>> I was referring to the auditing and checkpointing functionality. It
>> *could* be implemented in the engine, but my assumption was that it
>> would be implemented directly in the database for maximum 
>> robustness and speed.

> Could you give a breif example of how to do this, in e.g. postgres?
> (I am certain oracle has more/fancier directives; practically
> speaking, howefvr, it'll be postgres).

Yes, indeed, please do.

I remain skeptical that all that is supposed to be done may be
accomplished in the DB, and outside the GnuCash engine(s).

PostgreSQL certainly does support sorts of logging that would support
some forms of checkpointing; its capabilities are actually quite
sophisticated, allowing "temporal" queries, where you ask how the DB
looked at some past point in time.

The notion that this leads naturally to both having the ability to
roll back to exactly what we might want to roll back to is rather less
true.  

What happens in practice is that people are liable to conclude that
"evil things happened between 4pm and 6pm yesterday; we want to get
rid of just that stuff, and by the way, just the stuff done by a
particular set of users."  

Database engines don't generally provide that sort of control; your
only useful choice is probably to roll back to the state effective
4pm.  Anything more intelligent would require that something more on
the GnuCash engine side would manage the auditing.

The thing I'm even more curious about is how this might be expected to
affect balance management; a scheme has been outlined to provide a
pretty efficient way of avoiding reading _too_ much data from DBMS
when working with account balances.  It seems to me to be a pretty
nasty one to try to maintain as a set of triggers that would sit on
the DBMS side.
--
(reverse (concatenate 'string "gro.mca@" "enworbbc"))
http://www.ntlug.org/~cbbrowne/linuxdistributions.html
"...  They are  not ``end  users'' until  someone presupposes  them as
such, as witless cattle." -- <craig@onshore.com>