It must be the ancient version of Rails we are using then. The 
postgresql_adapter requires a gem (whatever version, postgres-pr, 
ruby-postgres, etc) that calls itself 'postgres', and I imagine pg only 
responds to 'pg'. Perhaps Rails 3.0 requires either postgres OR pg. It 
might be possible I could modify the adapter but that is probably asking 
for trouble.

Either way though, ruby-postgres seems to work fine so far. It no longer 
deadlocks. However, calling allow_concurrency = true on ActiveRecord 
seems to cause the server to hang. After I commented it out, however, 
things went fine and there was no deadlock. I do get messages from 
postgres such as "warning: transaction in progress", which I'm guessing 
is the result of my threads hitting the same table at the same time (I 
did this on purpose to test). I'm guessing that allow_concurrency is 
supposed to prevent this by making ActiveRecord queue up these 
transactions, but like I said it seems to make the server hang. So the 
question really is, can postgres handle these overlapping transactions? 
It seems to do a good job queueing them up so far, but I guess we'll 
have to see.

Again, any insight is appreciated.


-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to