connection problem
От | Abdul-wahid Paterson |
---|---|
Тема | connection problem |
Дата | |
Msg-id | 1052758103.25773.1225.camel@yusuf.lintrix.net обсуждение исходный текст |
Список | pgsql-general |
Hi, I have a bit of code that is causing me problems. I am using the Perl Pg module for connecting to Postgres because it is close to libpq. I have the following lines (simplified from my original program) # Test database connection if($conn->status != PGRES_CONNECTION_OK) { die "DB Error: ".$conn->errorMessage."\n"; } else { print "********Connection ok********\n"; } # vacuum my $sql = "VACUUM verbose"; my $result = $conn->exec($sql); if($result->resultStatus != PGRES_COMMAND_OK) { die "SQL: $sql\nDB ERROR: ".$conn->errorMessage."\n"; } The output I get from this part of the script is: ********Connection ok******** SQL: VACUUM verbose DB ERROR: pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. The strange thing is, other scripts on the server are working fine and the database server hasn't been causing any other problems. The server with the problem is Postgres 7.1.3 (bit old I know but client has not got around to upgrading). On my development machine I am running Postgres 7.3.2 and the same piece of code works fine and vacuums the database as expected. Any ideas what would cause the backend to reset and produce a pqReadData error? Could the $conn->status give incorrect information? Regards, -- Abdul-Wahid Paterson Lintrix Networking & Communications ltd. Web: http://www.lintrix.net/ Tel: +44 7801 070621 Email/Jabber: aw@lintrix.net -------------------------------------------------------------------- Web-Hosting | Development | Security | Consultancy | Domains --------------------------------------------------------------------
Вложения
В списке pgsql-general по дате отправления: