Обсуждение: Backend not sending ReadyForQuery packet?

Поиск
Список
Период
Сортировка

Backend not sending ReadyForQuery packet?

От
Christian von Kietzell
Дата:
Hi,

I have sent the startup packet to the postmaster who responded with
"R0". Afterwards I get a BackendKeyData packet from the backend.
According to the docs I'm not supposed to send anything but to wait
for the backend to send a ReadyForQuery packet which never comes.
I've analysed the TCP traffic psql generates. Oddly enough, even psql
doesn't wait for this packet but sends "Qselect getdatabaseencoding()"
instantly.

Are the docs wrong or am I blind an missing some important detail?

Cheers,
  Christian

P.S. I'm using PostgreSQL 7.1.3

--
Christian von Kietzell
mailto: chris@gammu.ath.cx
Jabber: cuboci@charente.de

Re: Backend not sending ReadyForQuery packet?

От
Tom Lane
Дата:
Christian von Kietzell <chris@gammu.ath.cx> writes:
> I have sent the startup packet to the postmaster who responded with
> "R0". Afterwards I get a BackendKeyData packet from the backend.
> According to the docs I'm not supposed to send anything but to wait
> for the backend to send a ReadyForQuery packet which never comes.
> I've analysed the TCP traffic psql generates. Oddly enough, even psql
> doesn't wait for this packet but sends "Qselect getdatabaseencoding()"
> instantly.

Are you sure that the ReadyForQuery message (a single 'Z') isn't
arriving in the same packet as the BackendKeyData message?  The
backend doesn't do unnecessary flushes, so I'd fully expect those
to arrive in the same TCP packet.

            regards, tom lane