From bfc4d8be0a61b795ee122c5f426e0873938d0e41 Mon Sep 17 00:00:00 2001 From: Jacob Evelyn Date: Mon, 15 Oct 2018 15:00:07 -0400 Subject: 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. --- guides/source/configuring.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'guides/source') 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` -- cgit v1.2.3