Allow creation of all tables as unlogged in non-production environments #2134
JacobEvelyn
started this conversation in
General
Replies: 2 comments 3 replies
-
I'll consider a Database option on PostgreSQL to create unlogged tables by default (if no |
Beta Was this translation helpful? Give feedback.
2 replies
-
I added support for this in 235a62a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Postgres provides guidance on settings that can be tweaked to reduce durability when not needed. One of these is the use of unlogged tables. We'd like to be able to speed up our DB-heavy tests by having our Rails app use only unlogged tables in test environments, which we set up via
rake db:schema:load
loading aschema.rb
file.I'm aware that in #1778 you indicated the schema file should not include
unlogged: true
. However, would you be open to a global, opt-in option we could configure in e.g.config/environments/test.rb
allowing us to force all tables to be created as unlogged?For comparison,
ActiveRecord
supports this via theActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables
setting.Beta Was this translation helpful? Give feedback.
All reactions