Pergunta

If I set journal_size_limit = 67110000 (64 MiB) will I be able to:

  1. work with / commit transactions over that value (somewhat unlikely)
  2. be able to successfully perform a VACUUM (even if the database has like 3 GiB or more)

The VACUUM command works by copying the contents of the database into a temporary database file and then overwriting the original with the contents of the temporary file. When overwriting the original, a rollback journal or write-ahead log WAL file is used just as it would be for any other database transaction. This means that when VACUUMing a database, as much as twice the size of the original database file is required in free disk space.

It's not entirely clear in the documentation, and I would appreciate if someone could tell me for sure.

Foi útil?

Solução

The journal_size_limit is not an upper limit on the transaction journal; it is an upper limit for an inactive transaction journal.

After a transaction has finished, the journal is not needed, but not deleting the journal can make things faster because the file system does not need to free this data and then reallocate it for the next transaction.

The purpose of this setting is to limit the size of unused journal data.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top