Richard Hipp <d...@sqlite.org> wrote:

> On Tue, Aug 21, 2012 at 5:30 AM, Dominique Pellé
> <dominique.pe...@gmail.com>wrote:
>
>> Hi
>>
>> Once in a while, I see an error when doing a "VACUUM" operation.
>>
>> sqlite3_exec3(...) returns status=14 (unable to open database file).
>> I suppose that it fails to open a temporary database when doing
>> the VACUUM operation, but I don't see why.
>>
>
> You might have plenty of disk space left, but do you have plenty of *temp*
> disk space left?  I assume you are on Linux?  Is /var/tmp mounted on a
> separate filesystem?  Do you have plenty of disk space in /var/tmp?

It's on Linux x86_84.

/var/tmp is on the / file system, which has 364Gb available space
The size of the Database that I try to vacuum is "only" 2.5 Gb.
So running out of disk space does not look possible.

Shouldn't I get another error message if somehow there was not
enough disk space anyway?  Like SQLITE_FULL = 13?


Simon Slavin wrote:

> On 21 Aug 2012, at 10:30am, Dominique Pell<e9> <dominique.pe...@gmail.com> 
> wrote:
>
> > I wonder whether VACUUM of different databases happening
> > in parallel in different processes could use the same temporary
> > file names, causing conflicts.
>
> I don't think so.  SQLite makes up a random filename for the temporary
> database, then checks to see that the file doesn't already exist before
> it makes it.

It seemed unlikely indeed that such a bug (conflicting tmp files) would be
in SQLite, since SQLite is so widely used, but I had no other explanation
so far.

But... you say (1) SQLite creates a random file name and THEN (2) checks
to see if it does  not already exist (3) before it makes it. It seems that there
is a small window here in between (2) and (3) if two processes creates the same
file name at the same time, if there is no mutual exclusion. I still doubt
that would be the issue in practise.

I asked in case I was missing something obvious. It looks like no.

I'll debug further, look at errno (etc.) or come up with a simple program
that reproduces it.

Regards
-- Dominique
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to