[Backgroundrb-devel] postgres barfage revisted

Jack Nutting jnutting at gmail.com
Mon Mar 5 17:13:56 EST 2007

First of all, I'd like to do what I've seen several others here do:
thank Ezra and any other contributors for producing a really great
plugin.  Even though I'm having some minor problems, this is all so
approachable and easy to work with and dig into...  I hate to think of
the hoops you'd need to jump through (both as creator of such a system
and as a user) to do something similar in Java.

Now then...  I've stumbled across the problem described here:


wherein the native Ruby adaptor for Postgres causes Backgroundrb to
crap out with messages like this:

ActiveRecord::StatementInvalid: NoMethodError: undefined method
`async_query' for #<PGconn:0x22ed648>:

The author's suggested solutions were to either use the compiled
ruby-postgres, or set ActiveRecord::Base.allow_concurrency to false in
a start script.

Well, the first option seems tricky to me;  I haven't succeeded in
getting that compiled for Mac OS X yet (granted, I haven't given it
too much effort yet), so I figured I'd try the second option.  I
couldn't find any start script where I could actually make that
setting have any effect, and eventually I realized that it's being set
to true at worker_rails.rb:21.  If I comment out that line, suddenly
I'm back in business!

What I wonder is if I'm setting myself up for future catastrophe with
that change.  I figure it's got to be in there for *some* reason.  I
think I read somewhere that Backgroundrb changed from a multi-thread
to a multi-process architecture not too long ago;  Is that line,
setting allow_concurrency to true, a holdover from the multi-threaded
days that's no longer needed?

// jack
// http://www.nuthole.com

More information about the Backgroundrb-devel mailing list