On Aug 8, 2006, at 4:16 AM, Philip M. Gollucci wrote:
I Assume you are you're using Apache::Session::Postgres,
Yes
I assume your passing DBH => $dbh, and LockDBH => $dbh,
No locking in pg
On Aug 8, 2006, at 10:36 AM, Perrin Harkins wrote:
This usually means that your connection parameters are not always
identical, or that you loaded Apache::DBI too late. Set
$Apache::DBI::DEBUG = 2 to see debugging info in the logs.
I"m not sure what I see. I see ton of openings and closings
my Pg args are
'Postgres'=> {
'DataSource'=> 'dbi:Pg:dbname=findmeon',
'UserName'=> 'Session_user',
'Password'=> 'Session_password',
'Commit'=> 1,
},
and i'm seeing new connections when there shouldn't be, and vice versa
though i think i've figured it out.
Digging thought Apache::Store::Postgres source, i see this:
return if (defined $self->{dbh});
=snip
if (exists $session->{args}->{Handle}) {
$self->{dbh} = $session->{args}->{Handle};
$self->{commit} = $session->{args}->{Commit};
return;
}
=snip
$self->{dbh} = DBI->connect(
$datasource,
$username,
$password,
{ RaiseError => 1, AutoCommit => 0 }
) || die $DBI::errstr;
that makes me think 2 things:
if you set up Apache::Session::Pg with a handle , you're kind of set
if you set up Apache::Session::Pg with the connect args itself,
you're screwed. Commit isn't really an 'AutoCommit' argument like in
the other stores, and its requiring raise error.
i'm going to try do a connect on init based on what Apache::Session
expects, and then rewrite my Session layer to accept handles from my
db::factory
i *think* that should work