![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes: Description: message type 0x49 arrived from server while idle Hm. This would seem to have something to do with issuing empty queries (message type 0x49 = 'I' is EmptyQueryResponse). I couldn't duplicate the problem in some simple tests, however. Unless you can come up with more information, there's not a lot I can do ... |
|
The PGSQL version on Solaris is 7.3.3, but that shouldn't matter? No, that's *extremely* relevant, because it means the wire protocol is going to be 2.0 not 3.0. I couldn't get anything funny to happen by issuing empty queries with a 7.3 libpq and a 7.4 server, though. |
#2
| |||
| |||
|
|
Robert Creager <Robert_Creager (AT) LogicalChaos (DOT) org> writes: What more information would you be looking for? Well, in the words of the old saw, if we knew what we were looking for it wouldn't be research ... |
|
I'm sure we could solve it quickly if we could get a reproducible test case, but it sounds like you are nowhere near being able to provide that. I would suggest looking for context information: what else is happening at the same time this happens? |
|
Another thing that would probably give enough information to solve it is a trace of the connection from a TCP packet sniffer, for at least a few packets leading up to the error message. Not sure if it's practical to try to get one, but if you could it'd be great. |
#3
| |||
| |||
|
|
A custom Perl 5.6.1, DBI 1.30, DBD::Pg 1.22 script on Solaris 5.8. Using pgsql client version 7.3.3. I'm thinking it may be related to my forking? My program has a db connection, which is then overwritten in all child processes, first thing upon forking: Judging by that trace, there are multiple processes trying to use the same database connection. Better take a closer look at what you are doing. I suspect that "overwriting" the connection is not good enough, and that you have to somehow actively close the DBI object inherited from the parent. The fact that the excess operations all seem to be empty queries is suspicious. I wonder whether those are coming from logic internal to DBI or DBD::Pg, that might still have access to the connection even though your Perl code doesn't anymore. |
|
Hmm ... AFAIR, libpq doesn't provide any clean way to close the socket and discard the PGconn without actually sending a Terminate message to the backend, which is what you'd want to happen in the child process. This seems like a shortcoming in its API. |
![]() |
| Thread Tools | |
| Display Modes | |
| |