diff options
author | Jacob Evelyn <jevelyn@panoramaed.com> | 2018-10-15 15:00:07 -0400 |
---|---|---|
committer | Jacob Evelyn <jevelyn@panoramaed.com> | 2018-11-13 09:37:20 -0500 |
commit | bfc4d8be0a61b795ee122c5f426e0873938d0e41 (patch) | |
tree | 4c8c09a2c4a2a35b8681e89525909046d5a5071b /guides | |
parent | 82f2e9741fb075f209d6018de2777c0aab3a829c (diff) | |
download | rails-bfc4d8be0a61b795ee122c5f426e0873938d0e41.tar.gz rails-bfc4d8be0a61b795ee122c5f426e0873938d0e41.tar.bz2 rails-bfc4d8be0a61b795ee122c5f426e0873938d0e41.zip |
Add support for UNLOGGED Postgresql tables
This commit adds support for the
`ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables`
setting, which turns `CREATE TABLE` SQL statements into
`CREATE UNLOGGED TABLE` statements.
This can improve PostgreSQL performance but at the
cost of data durability, and thus it is highly recommended
that you *DO NOT* enable this in a production environment.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/configuring.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md index d03943ba4a..706964090e 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -379,6 +379,14 @@ The MySQL adapter adds one additional configuration option: * `ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans` controls whether Active Record will consider all `tinyint(1)` columns as booleans. Defaults to `true`. +The PostgreSQL adapter adds one additional configuration option: + +* `ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables` + controls whether database tables created should be "unlogged," which can speed + up performance but adds a risk of data loss if the database crashes. It is + highly recommended that you do not enable this in a production environment. + Defaults to `false` in all environments. + The SQLite3Adapter adapter adds one additional configuration option: * `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer` |