mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 20:22:45 +08:00
408d2f8e69
Why this change? This patch has been added to address the problems identified in https://github.com/rails/rails/issues/35311. For every, new connection created using the PostgreSQL adapter, 3 queries are executed to fetch type map information from the `pg_type` system catalog, adding about 1ms overhead to every connection creation. On multisite clusters where connections are reaped more aggressively, the 3 queries executed accounts for a significant portion of CPU usage on the PostgreSQL cluster. This patch works around the problem by caching the type map in a class level attribute to reuse across connections. |
||
---|---|---|
.. | ||
active_record_attribute_methods.rb | ||
ams_include_without_root.rb | ||
cache_postgresql_connection_type_map.rb | ||
copy_file.rb | ||
cose_rsapkcs1.rb | ||
fast_pluck.rb | ||
inflector_backport.rb | ||
ip_addr.rb | ||
mail_disable_starttls.rb | ||
rails_multisite.rb | ||
rails4.rb | ||
safe_buffer.rb | ||
safe_migrations.rb | ||
schema_migration_details.rb | ||
sprockets_patches.rb | ||
translate_accelerator.rb | ||
web_push_request.rb |