Re: Startup messages for socket protocol

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guillaume Yziquel <guillaume(dot)yziquel(at)citycable(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Startup messages for socket protocol
Date: 2011-03-17 14:48:50
Message-ID: 12288.1300373330@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Guillaume Yziquel <guillaume(dot)yziquel(at)citycable(dot)ch> writes:
> However, when I try to send this as the first thing, I get disconnected
> by the server. Reading what the psql program does, I first get an 8 byte
> message containing this:

> \000\000\000\008\004\210\022/

> This seems to work, but I'm at a loss pinpointing in the libpq source
> code where that would fit in the protocol.

[ scratches head... ] You should be getting either an ErrorResponse
message or some AuthenticationXXX variant, and both of those would start
with an ASCII character ('E' or 'R'). I'm not sure what the above could
be, unless maybe you're somehow triggering an SSL startup handshake ---
but the first returned byte should be an 'S' in that case. Are you sure
you've correctly identified what is payload data, versus what's TCP
overhead or something like that?

It might also be enlightening to look into the server's log, especially
if you were to crank log_min_messages way up so it logs debug stuff.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-03-17 14:52:36 Re: Is PostgreSQL supported on RHEL6?
Previous Message Gauthier, Dave 2011-03-17 14:48:37 Getting users/privs for tables.