The reason for this duplication is to make the pgworker light weight.  All it needs is 'pg' and 'underscore'.  By switching to 'datasource.js' you're bootstrapping a lot more of our stack that isn't needed.  Things have changed a lot since this was originally added, so this may work fine now.  XT had a lot of baggage we were trying to get away from with this worker thread.

This was my first stab at spawning a child process and is far from perfect.  I'm not going to merge this in and test it right now (I've got a deadline this week), but some things to look for:

1. Do you still see multiple node processes running in your system when you turn on the worker? Without it, there should only be one.
2. If you change the pool size, do you see the PostgreSQL connection processes change as well?  This is important for PGBouncer to work because the pool must === 1.
3. What is the memory usage at idle with the worker on vs. off before and after this change? What about at load?

I'll dig up the original email thread where I introduced the pgworker so you can see some of the background.