Skip to content

RPostgreSQL && snowfall

2 messages · Florian Endel, Whit Armstrong

#
Dear expeRts,

I'm currently trying to get data from a PostgreSQL database _in parallel_.
I tried two methods:
* passing the DBI Connection object to the cluster nodes
* connecting the the DB on each node

(1)
The execution of the first method looks like this:
and produces an "expired PostgreSQLConnection" error.
(Of course the passed Connection Object is usable at that moment and
afterwards!)

(2)
For the creation of DB connections on every node a function handling
the whole connection is sourced into every node.
This function works perfectly without snowfall.
Calling it with
again only expired connection objects are produced. Even if I create
the connection 'a line above' the code which is connecting to the DB
it doesn't work...


Is there a possibility to connect to PostgreSQL using snowfall?

--
with kind regards
Florian
#
I don't think you can share dbi connections across different instances of R.

just have each of your helper functions open a local connection.  or
alternatively, load a package on each instance which keeps a dbi
connection open.

and make sure you bump up your allowed number of connections in
pg_conf if you need to.

-Whit
On Mon, Jun 6, 2011 at 12:40 PM, Florian Endel <florian at endel.at> wrote: