Why rely on sqlite to store the information? The Unix spirit is to use ascii format, easy to read and to edit (vi), it looks like the Microsoft registry...
Because it is less likely to have corruption than the text-based files were and much, much faster. Users of older versions remember waiting on "registering package..." messages.
Speaking of the sqlite database, is there anything to deal with corruption or other issues? When I converted one machine to
pkg
, feels like something went wrong, because
pkg
operations are much slower than they were
pkg_*
operations.
I recall that I tried an 'optimize' (dump and reload), but
pkg
refused to reconigize the result, so restored the original db. Figure something different about how its sqlite works compared to my build of
databases/sqlite3?
For a long time I was stumped by messages during the day that were like "waiting for lock", or failing because its locked. I'm the only user on the machine....though sometimes because its so slow I might have accidentally tried the command again in another window...but eventually found that it was the daily pkg audit or checksum that was taking most of the day to run, instead ~10 minutes on this machine (which has 2119 packages while the slow one has 1543 packages) was the likely culprit.
I would expect that my machine having SSD root pool vs the slow machine have just a pair of spinning disks....except maybe for them being write optimizing drives....wasn't the reason for the huge differences.
For some reason I had hoped that there's something special in my a basic dump and reload wasn't ok, and that pkg backup and restore would do....but all it seems to do is make a compressed copy in
/var/backup
and then decompress it back for restore. I have also been hoping with each new release that it might take care of the problem...but so far it persists.
Also interesting is that my sqlite database is 92M, while a .dump of it is 67M. Though create an sqlite database from the dump results in a 95M file. OTOH if I do a vacuum of the original database, the result is 88M, while vacuum of database from .dump file is 87M....
pkg
will work use the result fomr vacuum, but not work with database create from dump before or after vacuum.
Error is "table licenses already exists"
The Dreamer.