Closed twe4ked closed 6 years ago
We're going to be using this to set the application_name on our Postgres connections so we can see where queries are coming from in pg_stat_activity.
application_name
pg_stat_activity
after_fork = -> (event_processor) { [App.projections_database, App.event_store_database].each do |connection| processor_name = connection.literal(event_processor.processor_name) connection.execute("SET application_name TO '#{processor_name}'") end }
We're going to be using this to set the
application_name
on our Postgres connections so we can see where queries are coming from inpg_stat_activity
.