Where is the journal file for locking_mode=EXCLUSIVE?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Where is the journal file for locking_mode=EXCLUSIVE?

Peng Yu
https://www.sqlite.org/tempfiles.html

The above page says that there should be a journal file.

"The PERSIST journal mode foregoes the deletion of the journal file
and instead overwrites the rollback journal header with zeros, which
prevents other processes from rolling back the journal and thus has
the same effect as deleting the journal file, though without the
expense of actually removing the file from disk."

But I don't see it. Does anybody why I don't see the journal file?
What does "normal" printed mean?

$ sqlite3 /tmp/dbfile -header -separator $'\t' <<EOF
pragma locking_mode=persist;
replace into mytab (h1, h2) values ('c', 3);
select * from mytab;
EOF
locking_mode
normal
h1 h2
a 1
b 2
c 3

$ tree -a /tmp
/tmp/tmp.8AQfJtKGt8
└── tmp.AXkrf1a5Y3.sq3

--
Regards,
Peng
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Where is the journal file for locking_mode=EXCLUSIVE?

Olivier Mascia

> Le 30 janv. 2020 à 15:05, Peng Yu <[hidden email]> a écrit :
>
> https://www.sqlite.org/tempfiles.html
>
> The above page says that there should be a journal file.
>
> "The PERSIST journal mode foregoes the deletion of the journal file
> and instead overwrites the rollback journal header with zeros, which
> prevents other processes from rolling back the journal and thus has
> the same effect as deleting the journal file, though without the
> expense of actually removing the file from disk."
>
> But I don't see it. Does anybody why I don't see the journal file?
> What does "normal" printed mean?
>
> $ sqlite3 /tmp/dbfile -header -separator $'\t' <<EOF
> pragma locking_mode=persist;

Minor confusion between the pragma locking_mode and pragma journal_mode.
You want pragma journal_mode=persist here, not pragma locking_mode=persist, which does not exists.

⏤  
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit freundlichen Grüßen,
Olivier Mascia


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users