Re: Strange error (Socket command option unknown)

From: Carlos Moreno <moreno(at)mochima(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange error (Socket command option unknown)
Date: 2003-02-23 14:54:51
Message-ID: 3E58E0BB.8010205@mochima.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

>Carlos Moreno <moreno(at)mochima(dot)com> writes:
>
>>"FATAL 1: Socket command option e unknown"
>>
>
>You sure it doesn't say
> Socket command type e unknown
>

No, I'm not sure :-) In fact, I *am sure* that it is indeed
the way you say :-)

BTW, some times the type is p, instead of e.

>
>? Because that's how it's spelled in tcop/postgres.c, and I don't see
>any other messages like this.
>
>This message is basically saying that the backend got an unexpected
>start-of-message character from the frontend. Usually this happens
>because the frontend and backend have gotten out of sync, and the most
>common cause of that is a failed COPY IN operation. COPY IN has no
>error-recovery ability worthy of the name :-(.
>

What is COPY IN?? I didn't find it in the documentation
(it talks about copy, copy from, copy to, copy binary, but
I didn't find copy in).

If COPY IN is an explicit SQL command, then I can tell
you for sure that my app. does not use a single one of
those (the fact that I still have no idea what it is may be
offered as evidence of that :-)). If it is something that
may be one of the parts involved in some other operation(s),
then maybe I'm using them (it's just that I wouldn't know)

Now, what I understand from your explanation is that
the *communication* between server and client get
out of sync?? Is that possible even when both are
running on the same machine, and not even using
TCP/IP to communicate?? (the server does have
TCP/IP enabled, since other applications, running on
different machines use it, but this application, the one
logging these errors, is running locally, and connect
to the server with a connection string that specifies
only dbname and user)

I wonder if the fact that my app. is multi-threaded
(logging to database is something that has kind of
low-priority, and I don't want it to interfere with the
"main loop" of my app. -- the main loop is basically
the communications loop, which is critical for the
responsiveness of my server to the multiple clients).

So, I wonder if I (or postgres??) is doing something
wrong with the multiple requests?? There are only
two threads that make any use of the database:
one that logs to db (i.e., exclusively insert, update,
and delete commands), and one to process the
login authentications (users' names and passwords
are stored in the database, along with related
information that has to be retrieved at login-time).

So, is it possible that these two threads are "stepping
on each other's tails"? The curious thing is that it
is always one specific insert statement the one
that causes the problem. I'm pretty intrigued,
since I don't see a single difference in the way
that statement is produced or processed... :-(

>Does your app use COPY IN a lot? What shows up in the postmaster log
>right before these messages?
>

Errr.... Where would I find that?? Should I explicitly
redirect the output of postmaster when I run it??
(I didn't :-( ). So I guess I know the first thing I
have to do...?? :-)

Thanks for your message!

Carlos
--

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-02-23 14:59:43 Re: troubles with postgresql
Previous Message erwan ancel 2003-02-23 14:38:30 Re: troubles with postgresql