I have a Python binary which uses SQLite as its backend database. SQLite's documentation and the code suggests that setting any of the following 3 environment variables should work:
export TMP=/var/tmp/sqlite/
export TEMP=/var/tmp/sqlite/
export TEMPDIR=/var/tmp/sqlite/
If I export the above variables in my bash script just before I start my Python binary, it does not help.
Another option I tried is calling putenv() by setting os.environ:
os.environ['TMP'] = /var/tmp/sqlite/
os.environ['TEMP'] = /var/tmp/sqlite/
os.environ['TEMPDIR'] = /var/tmp/sqlite/
None of above options has helped in persuading SQLite to use /var/tmp/sqlite as its temp store directory. The only option that has worked - which SQLite's documentation says is deprecated - is setting the temp_store_directory pragma statement:
PRAGMA temp_store_directory = '/egnyte/.work/sqlite_temp'
Since using the pragma statement is not the choice I would like to make, is there any other trick?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With