Documentation Source Text

Check-in [f814d9bff5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add documentation for new pragma "journal_size_limit".
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f814d9bff559558ab946a116cbbf3098dd41f646
User & Date: dan 2008-06-05 17:03:04.000
Context
2008-06-10
12:59
Updates to the cintro.html page. (check-in: 1e0484c51a user: drh tags: trunk)
2008-06-05
17:03
Add documentation for new pragma "journal_size_limit". (check-in: f814d9bff5 user: dan tags: trunk)
2008-05-30
18:58
Added Shane's picture and biography to the maintainers page. (check-in: c1fc3a9bee user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/pragma.in.
302
303
304
305
306
307
308


































309
310
311
312
313
314
315
    <p>The OFF journaling mode disables the rollback journal completely.
    No rollback journal is ever created and hence there is never a rollback
    journal to delete.  The OFF journaling mode disables the atomic
    commit and rollback capabilities of SQLite.  If a crash or power failure
    occurs in the middle of a transaction when the OFF journaling mode is
    set, then the database file will very likely go corrupt.</p>
</li>




































<tcl>Subsection legacy_file_format</tcl>
<li><p><b>PRAGMA legacy_file_format;
       <br>PRAGMA legacy_file_format = <i>ON | OFF</i></b></p>
    <p>This pragma sets or queries the value of the legacy_file_format
    flag.  When this flag is on, new SQLite databases are created in







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
    <p>The OFF journaling mode disables the rollback journal completely.
    No rollback journal is ever created and hence there is never a rollback
    journal to delete.  The OFF journaling mode disables the atomic
    commit and rollback capabilities of SQLite.  If a crash or power failure
    occurs in the middle of a transaction when the OFF journaling mode is
    set, then the database file will very likely go corrupt.</p>
</li>

<tcl>Subsection journal_size_limit</tcl>
<li><p><b>
    PRAGMA &#91;database.&#93;journal_size_limit
    PRAGMA &#91;database.&#93;journal_size_limit = </b><i>N</i> <b>;</b>

  <p>If a database connection is operating in either "exclusive mode"
  (PRAGMA locking_mode=exclusive) or "persistent journal mode"
  (PRAGMA journal_mode=persist) then under certain circumstances
  after committing a transaction the journal file may remain in
  the file-system. This increases efficiency but also consumes
  space in the file-system. After a large transaction (e.g. a VACUUM),
  it may consume a very large amount of space.

  <p>This pragma may be used to limit the size of journal files left
  in the file-system after transactions are committed on a per database
  basis. Each time a transaction is committed, SQLite compares the
  size of the journal file left in the file-system to the size limit
  configured using this pragma. If the journal file is larger than the
  limit allows for, it is truncated to the limit.

  <p>The second form of the pragma listed above is used to set a new limit
  in bytes for the specified database. A negative number implies no limit.
  Both the first and second forms of the pragma listed above return a single
  result row containing a single integer column - the value of the journal
  size limit in bytes. The default limit value is -1 (no limit), which
  may be overridden by defining the preprocessor macro
  SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT at compile time.

  <p>If no [database] is specified, the pragma operates on the main database.
  There is no way to operate on all attached databases using a single
  PRAGMA statement, nor is there a way to set the limit to use for databases
  that will be attached in the future.
</li>


<tcl>Subsection legacy_file_format</tcl>
<li><p><b>PRAGMA legacy_file_format;
       <br>PRAGMA legacy_file_format = <i>ON | OFF</i></b></p>
    <p>This pragma sets or queries the value of the legacy_file_format
    flag.  When this flag is on, new SQLite databases are created in