What the heck is happening here?

From: Paul Tomblin <ptomblin(at)xcski(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: What the heck is happening here?
Date: 2001-06-11 21:06:51
Message-ID: 20010611170651.C21446@allhats.xcski.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a mod_perl script that opens a database connection, and keeps it
open. But every day the script stops running. Today I look in the logs,
and at 10:37 I see my script detect a bad return from a $conn->exec of the
following query:
SELECT id, datasource_key, type, name, address,
state, country, latitude, longitude, declination,
main_frequency, elevation, datasource
FROM waypoint
WHERE latitude >= -90 AND latitude <= 90 AND
longitude >= -180 AND longitude <= 180 AND
(country IN ('UNITED STATES') OR
(state IN ('AK','AL','AR','AZ','CA','CO','CT','DC','DE','FL','GA','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VA','VT','WA','WI','WV','WY') AND country = 'UNITED STATES') OR
(state IN ('') AND country = 'CANADA') ) AND
type IN ('AIRPORT','DME','FAN MARKER','MARINE NDB','NDB','NDB/DME','TACAN','UHF/NDB','VOR','VOR/DME','VORTAC')
ORDER BY id, datasource

(yeah, I know the query has some redundancy in it - that's not the problem
here) but it prints the following message:

message: Unknown protocol character 'Unknown protocol character '8' read from backend. (The protocol character is the first character the backend sends in response to a query it receives).
Unknown protocol character '0' read from backend. (The protocol character is the first character the backend sends in response to a query it receives).
Unknown protocol character '.' read from backend. (The protocol character is the first character the backend sends in response to a query it receives).
Unknown protocol character '3' read from backend. (The protocol character is the first character the backend sends in response to a query it receives).
Unknown protocol character 'Unknown protocol character '.' read from backend. (The protocol character is the first character the backend sends in response to a query it receives).

It returns all the query rows, but I do another query within the query,
and every one of those prints out the following error message:
PQexec: you gotta get out of a COPY state yourself.
Which is kind of strange because I don't even know how to use COPY.

Then the next connection to the web server does the same thing, but the
next one gets the "you gotta get out of a COPY state yourself" on the big
query.

Any ideas? Should I stop keeping the connection open so long?

--
Paul Tomblin <ptomblin(at)xcski(dot)com>, not speaking for anybody
Your mouse has moved. Windows NT must be restarted for the change to
take effect. Reboot now? [ OK ]

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pete Leonard 2001-06-11 21:12:36 stumped on view/rule/delete problem.
Previous Message mi 2001-06-11 21:05:51 Re: sysauth-pgsql / pam-pgsql port(s) ...