View Full Version : Re: Slimserver footprint, time and space, and anarchitectural suggestion

John A. Tamplin
2005-06-06, 13:58
On Mon, 6 Jun 2005, Maditude wrote:

> Make the database-rebuild fork a new process to create a NEW database
> (leaving the existing one alone). Then, when it completes, send a
> message to the main slimserver process, informing it that there's a
> newly built database. Then, slimserver could just close it's
> db-connection(s), discard the current database, rename the new
> database, and re-connect to it. It might still be slow enough that
> really low-spec servers would still have dropouts, and the extra
> disk-space consumed could be a concern, but it seems like it oughta
> work, and put an end to a whole lotta griping here.

That might work ok when you know how the underlying database is stored,
which might be feasible for SQLite. However, in general you have no
information about what the underlying database does with its data, you
probably don't have permission to move it around, would require
cooperation with potentially other processes accessing the database, and
it may reside on another machine in raw partitions rather than disk files.
Even if you did it all through SQL, it would not be terribly faster to
read from the newly built database and insert into the current database
than just doing it there to start with, and you have other issues with
locking to prevent updates from stepping on each other.

John A. Tamplin jat (AT) jaet (DOT) org
770/436-5387 HOME 4116 Manson Ave
Smyrna, GA 30082-3723