Greg <grigorey(at)yahoo(dot)co(dot)uk> writes:
> Hi Tom, thanks for the quick reply. I've looked at the break points and you are right there are 7 more bytes with data send with AuthenticationOk message, so I think thats what I need to look at :) (Im sure this is just a confirmation that everything is ok).
> May I ask, sequence of bytes after the AuthenticationOk messages is: 0080003; Is this sequence represent BackendKeyData or values for Authentication*** status codes, or Im completely worng and it is realy nothing but confirmation for a frontend how the database applied options passed with start-up packet?
That doesn't look right at all. Per the start-up portion of the Message
After having received AuthenticationOk, the frontend must wait for further messages from the server. In this phase a backend process is being started, and the frontend is just an interested bystander. It is still possible for the startup attempt to fail (ErrorResponse), but in the normal case the backend will send some ParameterStatus messages, BackendKeyData, and finally ReadyForQuery.
I'd expect ten or so ParameterStatus messages (depending on which PG
version you are working with), so there's easily going to be 100+ bytes
between the AuthenticationOk and ReadyForQuery messages. As I said
earlier, the backend will not flush this data out until it's ready for a
query, so you should expect to see it all arriving in one network
[ eyeballs that data some more... ] Are you *sure* you've collected an
AuthenticationOk message? The various authentication response messages
all have the same type code ('R'), and 0000000800000003 would be what
follows that for AuthenticationCleartextPassword. Maybe the backend is
really challenging you for a password. Have you checked what ought to
happen according to pg_hba.conf?
regards, tom lane
In response to
pgsql-novice by date
|Next:||From: raghu ram||Date: 2010-06-29 07:48:34|
|Subject: Re: [NOVICE] Prepared statement issue in Pgpool-II|
|Previous:||From: raghu ram||Date: 2010-06-28 22:14:19|
|Subject: Prepared statement issue in Pgpool-II|