Re: Postgre Protocol
От | Tom Lane |
---|---|
Тема | Re: Postgre Protocol |
Дата | |
Msg-id | 5797.1277766645@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Postgre Protocol (Greg <grigorey@yahoo.co.uk>) |
Ответы |
Re: Postgre Protocol
|
Список | pgsql-novice |
Greg <grigorey@yahoo.co.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 datasend with AuthenticationOk message, so I think thats what I need to look at :) (Im sure this is just a confirmation thateverything is ok). > May I ask, sequence of bytes after the AuthenticationOk messages is: 0080003; Is this sequence represent BackendKeyDataor values for Authentication*** status codes, or Im completely worng and it is realy nothing but confirmationfor 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 Flow section: After having received AuthenticationOk, the frontend must wait for further messages from the server. In this phase abackend process is being started, and the frontend is just an interested bystander. It is still possible for the startupattempt 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 packet. [ 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
В списке pgsql-novice по дате отправления: