Thread: postgres access via perl failing after upgrade

postgres access via perl failing after upgrade

From
"Fetter, David M"
Date:
I'm attempting to upgrade our version of postgres from 6.4.3, which has a
couple of not too good bugs, to 7.0.2.  I can successfully upgrade, export
and import the database, however the perl scripts that we were using
(written by somebody who's gone now) no longer work.  I've traced the
problem to the following line:

$dbh = DBI->connect("dbi:Pg:dbname=$PGDB;host=$PGHOST;port=$PGPORT", , );

It looks like that at this point the script is actually trying to connect to
the database but it fails now for some reason.  This might not be enough of
the code to get an idea, but I thought perhaps it was for somebody.  Is
there anything within this connection that looks like it probably wouldn't
work after upgrading from the old version to the new?  Do I maybe need to
upgrade a perl module?  Any help, suggestions, or ideas would be
appreciated.  Thanks.


Thank you,
David M. Fetter 503.450.6609
UNIX System Analyst
Emery World Wide

"It has become appallingly clear that our technology has surpassed our
humanity." - Albert Einstein


Attachment

Re: postgres access via perl failing after upgrade

From
Tom Lane
Date:
"Fetter, David M" <Fetter.David@emeryworld.com> writes:
> and import the database, however the perl scripts that we were using
> (written by somebody who's gone now) no longer work.  I've traced the
> problem to the following line:

> $dbh = DBI->connect("dbi:Pg:dbname=$PGDB;host=$PGHOST;port=$PGPORT", , );

That will try to connect via TCP, so your problem might just be that you
didn't start the 7.0 postmaster with "-i" and/or didn't copy over your
old pg_hba.conf config file.  (See nearby thread about PGAccess
connect problems.)

If it's not that, we'll need to know exactly why it's failing to
connect.  There should be an error message coming out someplace ...

            regards, tom lane