Commit:
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=
3cbce4eaf870e89fdd8f8a2ad8fab8d3d8aadf65
broke version 2 protocol case. In the session initiation phase,
"MAJOR" macro is used *before* session context is created. In this
MAJOR macro returns PROTO_MAJOR_V3, which of course breaks v2 protocol
negotiation. Fix is, not to use MAJOR macro here.
int i;
StartupPacket *sp;
- protoMajor = MAJOR(cp);
+ protoMajor = MASTER_CONNECTION(cp)->sp->major;
kind = pool_read_kind(cp);
if (kind < 0)