Re: Sending several commands simultaneously to PostgreSQL 8.4 - Mailing list pgsql-general

From Alexander Farber
Subject Re: Sending several commands simultaneously to PostgreSQL 8.4
Date
Msg-id CAADeyWjMUG6wHqXox4pMyXMbBx672RfG=ydNA3AZbhpq6p0U_A@mail.gmail.com
Whole thread Raw
In response to Re: Sending several commands simultaneously to PostgreSQL 8.4  (Alexander Farber <alexander.farber@gmail.com>)
Responses Re: Sending several commands simultaneously to PostgreSQL 8.4
List 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


pgsql-general by date:

Previous
From: Alexander Farber
Date:
Subject: Re: Sending several commands simultaneously to PostgreSQL 8.4
Next
From: bhanu udaya
Date:
Subject: Re: pg_Restore