On Sat, 12 Mar 2005, Andrew Piskorski wrote:

On Sat, Mar 12, 2005 at 10:03:25AM -0700, Ara.T.Howard wrote:

does anyone have a strategy for doing massive updates to a db and atomicly
replacing it in a multi-process situation?

Why would you want to do that? SQLite properly supports transactions, so aren't you better of just using those? What scenario are you working with here? Do you have a large number of readers that MUST not block while a massive/slow update is done tot he database, or something like that?

precisely - active web site doing both reads and writes: long running update to perform.

obviously not too much (but maybe something) will be happening at night.  my
plan was

  lock db
  take copy
  note mtime
  release lock
  perform updates
  lock db
  if mtime has been updated
    retry
  else
    perform atomic replacement
  end

perhaps this is simply impossible with sqlite?

-a
--
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself.  --Shunryu Suzuki
===============================================================================

Reply via email to