search for: statement_timeout

Displaying 2 results from an estimated 2 matches for "statement_timeout".

2009 Sep 25
3
how to time out a query
Hi, I''ve got an activerecord query which takes longer than 100 seconds. I''m using rails 2.2 with postgresql 8.3. http://www.postgresql.org/docs/8.3/static/runtime-config-client.html mentions an option called "statement_timeout" which when set aborts a query which takes longer than x milli seconds. How do I pass this option to AR so that it in turn passes this to postgresql? cheers, skar. -- -- The life so short, the craft so long to learn.
2009 Oct 14
2
How to configure every (postgresql) db connection?
I would like to set some db session variables specific to my application on the database connection that rails uses. They can be set by issuing an SQL command like "SET statement_timeout = 1000" once - it will be in effect for every subsequent SQL statement that uses this connection. So I tried to put the following into an initializer: ActiveRecord::Base.connection.execute("SET statement_timeout = 1000") but this does not have the desired effect - it is not set fo...