[bind10-dev] #1376 will require upgrading sqlite3 database file
Michal 'vorner' Vaner
michal.vaner at nic.cz
Fri Nov 18 13:08:33 UTC 2011
Hello
On Fri, Nov 18, 2011 at 12:49:54PM +0000, Stephen Morris wrote:
> > I think we should have a script which would detect and run all upgrade and
> > maintenance stuff on the first start, or at last said they need to be run to
> > the user. In the case of adding a table, I'd say we can safely just do it (it
> > would be reasonably fast and wouldn't broke the database even if the user was to
> > downgrade).
>
> It's not quite trouble-free. If we do any change to the database, we
> should increment the version number (in the schema_version table). Code
> should be checking this version number when it starts up and refusing to
> run on a version number mismatch.
I don't think that adding a table in itself is a change of the schema. It's
extension of the schema than can always be checked by the existence of the
table. Anyway, that is a detail.
> Another problem with automatic upgrade is one of time. On systems with
> large amounts of data, a database upgrade could take a significant
> amount of time. Users would get very annoyed if they upgraded BIND 10
> then, after starting, it did nothing for the next couple of hours
> because it was upgrading the database.
If we would be adding a column to existing table, then yes. But adding a new
empty table to no matter how large database should be just fast, because it
doesn't need to do anything about the existing data.
> For this particular case you're probably right and an automatic update
> would work. Although there is a schema_version table in the database,
> there appears to be no check on the contents. So just adding a table at
> startup should not have adverse effects.
Anyway, if it should be automatic or just recommend the user to run something by
hand will probably need to be considered on case to case basis. My main idea was
that there would be the script that would perform all the checks at startup
before going on to start things up.
With regards
--
Never underestimate the bandwidth of a station wagon full of HDDs.
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20111118/66d65a2f/attachment.bin>
More information about the bind10-dev
mailing list