pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jdale@fla.fujitsu.com
Cc: pgsql-hackers@postgreSQL.org
Cc: pgsql-ports@postgreSQL.org
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Frontend/Backend Protocol
Date: Thu, 22 Jul 1999 20:30:31 -0400
Message-ID: <11030.932689831@sss.pgh.pa.us> (raw)
In-Reply-To: <3796C1D3.35DA43C8@fla.fujitsu.com>

Jonathan Dale <jdale@fla.fujitsu.com> writes:
> And I get back:
> "R" 00 00 00 00  which indicates a successful connection

Looks good so far (I suppose you are using 'trust' authentication mode).

> However, when my process has read this, the postmaster displays the
> following error:

> FATAL 1:  Socket command type   unknown

> and the connection is closed.

No, the postmaster didn't send that; the backend did.  Looks like you
sent one byte too many, probably a null byte, and the backend received
it as the first input data byte.  Since it's not a valid protocol
command character, the backend gives up and dies.

> I assumed that the
> postmaster would fork a new postgres process to handle my connection

... it did ...

> and I should be expecting some data on the socket to tell me that the
> postgres process is ready for an SQL query.

You should have gotten a ReadyForQuery message if you are talking to
a 6.4 or later backend, and if you used the right protocol version
number in the connect request.  I speculate that you have an old server,
or you asked for protocol version 1, or you miscounted bytes and missed
the appearance of the ReadyForQuery ('Z') message.

			regards, tom lane



view thread (2+ messages)

Message-ID: <11030.932689831@sss.pgh.pa.us>
Permalink:  ../11030.932689831@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11030.932689831@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jdale@fla.fujitsu.com, pgsql-hackers@postgreSQL.org, pgsql-ports@postgreSQL.org
  Subject: Re: [INTERFACES] Frontend/Backend Protocol
  In-Reply-To: <11030.932689831@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox