[Pgpool-hackers] retry of health check

Tatsuo Ishii ishii at sraoss.co.jp
Thu Mar 11 00:44:47 UTC 2010


> > Hmm.. in HEAD, 'E' is returned first in that case. Which version of
> > postgres returns 'R' first? Its behavior might depend on the version.
> 
> 8.4. Will check CVS HEAD.

You are right. CVS HEAD sends 'E' first(see below). Looks like someone
changed this part between 8.4 and CVS HEAD. This is good because
previous behavior was wrong IMO. Problem is, how to dealth with those
different behaviors. Probably the safest way is, after sending start
up packet to backend, read reply packet as many as possible, Then scan
the packet looking for 'E' message. Thoughts?

connect(3, {sa_family=AF_FILE, path="/tmp/.s.PGSQL.5435"}, 110) = 0
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getsockname(3, {sa_family=AF_FILE, path=@}, [2]) = 0
poll([{fd=3, events=POLLOUT|POLLERR, revents=POLLOUT}], 1, -1) = 1
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
send(3, "\0\0\0#\0\3\0\0user\0t-ishii\0database\0uu"..., 35, 0) = 35
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
poll([{fd=3, events=POLLIN|POLLERR, revents=POLLIN|POLLHUP}], 1, -1) = 1
recv(3, "E\0\0\0QSFATAL\0C3D000\0Mdatabase \"uu"..., 16384, 0) = 82
write(2, "psql: FATAL:  database \"uuu\" doe"..., 44psql: FATAL:  database "uuu" does not exist
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-hackers mailing list