Vacuuming sqlite files does not work

RESOLVED INVALID

Status

()

RESOLVED INVALID
10 years ago
10 years ago

People

(Reporter: zdenek.kabelac, Unassigned)

Tracking

1.9.1 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [invalid?])

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b2) Gecko/20081222 Fedora/3.1-0.4.beta2.fc11 Minefield/3.1b2
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b2) Gecko/20081222 Fedora/3.1-0.4.beta2.fc11 Minefield/3.1b2

Hi

I'm using from time to time the script for vacuuming sqlite file which are getting way to big over the time and it takes a lot of time to manipulate with those files - i.e. startup/exit time are way too long.

However with current version of firefox my script created unusable vacuumed sqlite files - firefox could not read passwords or search in using google and most probably few other things stopped to work as well.

Do I have to use a different way to vacuum these files ? 
Or is it a bug in firefox ?

Here is the script (originaly from mcepl@redhat.com):

#!/bin/sh

cd ~/.mozilla/firefox/*.default/
for db in *.sqlite ; do
    bzip2 --best --stdout $db >$db.bz2
    BASENAME=${db%*.sqlite}
    echo "PRAGMA AUTO_VACUUM=1;" >$BASENAME.sql
    sqlite3 $db ".dump" >>$BASENAME.sql
    rm $db
    sqlite3 $db ".read $BASENAME.sql"
    bzip2 --best $BASENAME.sql
done
cd -


Reproducible: Always

Steps to Reproduce:
1. run script
2. start firefox
3.
Actual Results:  
I've got nonfunctional files like signons.sqlite
Version: unspecified → 3.1 Branch
(Reporter)

Comment 1

10 years ago
I'll answer to myself - it looks like this way of vacuuming is actually functional now:

http://weblog.savanne.be/153-performance-tip-of-the-day

Though I've still no idea what is wrong with my original script.
Component: General → Storage
Product: Firefox → Toolkit
QA Contact: general → storage
Whiteboard: [invalid?]
Version: 3.1 Branch → 1.9.0 Branch
On 1.9.1 lots of things have changed with the places db and the others, so this is probably invalid.
Version: 1.9.0 Branch → 1.9.1 Branch
AUTO_VACUUM is bad, and we used it for a time but it actually lead to worse performance.  You shouldn't be setting PRAGMAs on your databases, because the code in Mozilla makes assumptions based on the PRAGMAs it sets.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.