Re: [sqlite] atomic db replacement

2005-03-21 Thread Ara.T.Howard
On Fri, 18 Mar 2005, Andrew Piskorski wrote: If besides that one slow update you had ONLY READS (and those reads do not care which version of the data they get, old or new), I'd say sure, fine, an atomic "swap in a totally new db" operation might be worth trying. But for a database with active

Re: [sqlite] atomic db replacement

2005-03-18 Thread Eli Burke
Andrew Piskorski wrote: On Thu, Mar 17, 2005 at 08:33:03PM -0700, Ara.T.Howard wrote: 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

Re: [sqlite] atomic db replacement

2005-03-18 Thread Andrew Piskorski
On Thu, Mar 17, 2005 at 08:33:03PM -0700, Ara.T.Howard wrote: > 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

RE: [sqlite] atomic db replacement

2005-03-17 Thread Lars Norved
Lothar Märkle <[EMAIL PROTECTED]> writes: >>> Assuming you have a cgi-like application with many processes >>> that just looks up a row, displays and then exits. You can >>> simple use the rename call to atomically replace the db file >>> (see man 2 rename for bordercases) with another and

Re: [sqlite] atomic db replacement

2005-03-17 Thread Ara.T.Howard
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

Re: [sqlite] atomic db replacement

2005-03-14 Thread Lothar Märkle
On Mon, Mar 14, 2005 at 11:50:45AM -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? > > > > Assuming you have a cgi-like application with many processes that just > > looks up a row,

Re: [sqlite] atomic db replacement

2005-03-14 Thread Ara T Howard
- Original Message - From: Lothar M=E4rkle <[EMAIL PROTECTED]> Date: Sunday, March 13, 2005 11:39 pm Subject: Re: [sqlite] atomic db replacement > > does anyone have a strategy for doing massive updates to a db and > atomicly> replacing it in a multi-process situat

Re: [sqlite] atomic db replacement

2005-03-13 Thread Lothar M?rkle
> does anyone have a strategy for doing massive updates to a db and atomicly > replacing it in a multi-process situation? Assuming you have a cgi-like application with many processes that just looks up a row, displays and then exits. You can simple use the rename call to atomically replace the db

Re: [sqlite] atomic db replacement

2005-03-12 Thread Andrew Piskorski
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?