From: | Alexander Farber <alexander(dot)farber(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Sending several commands simultaneously to PostgreSQL 8.4 |
Date: | 2013-01-21 14:45:27 |
Message-ID: | CAADeyWjMUG6wHqXox4pMyXMbBx672RfG=ydNA3AZbhpq6p0U_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I would like to add a private "key" to make
my dbh's different throughout my script:
eval {
my $dbh = DBI->connect_cached(DSN, DBUSER, DBPASS, {
AutoCommit => 1,
MY_PRIVATE_KEY => __FILE__.__LINE__, ### <-- HERE
PrintWarn => 1,
PrintError => 1,
RaiseError => 1,
FetchHashKeyName => 'NAME_lc',
pg_enable_utf8 => 1
});
..........SQL commands.......
};
warn $@ if $@;
}
As sugested by
http://search.cpan.org/~timb/DBI-1.616/DBI.pm#connect_cached
But how could I check - if this has worked
at my server and spawned more connections
through the /tmp/.s.PGSQL.5432
(versus the pg_bouncer connections
for PHP-scripts through /tmp/.s.PGSQL.6432) ?
I've tried:
# select * from pg_stat_activity where usename='XXXXX';
but the client_port is null there
(because I use Unix sockets?)
Thanks
Alex
From | Date | Subject | |
---|---|---|---|
Next Message | bhanu udaya | 2013-01-21 15:10:05 | Re: pg_Restore |
Previous Message | Alexander Farber | 2013-01-21 14:27:07 | Re: Sending several commands simultaneously to PostgreSQL 8.4 |