From: Paul B. <pb...@ib...> - 2006-05-30 13:56:12
|
> > 2. MySQL and PostgreSQL both set KEEPALIVE and NODELAY (surprise, surprise) > > for TCPIP sockets. http://lists.mysql.com/internals/25228 And I believe this is valid for PostgreSQL /* select NODELAY and KEEPALIVE options if it's a TCP connection */ if (port->laddr.sa.sa_family == AF_INET) { int on = 1; if (setsockopt(port->sock, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)) < 0) { perror("postmaster: StreamConnection: setsockopt(TCP_NODELAY)"); return STATUS_ERROR; } if (setsockopt(port->sock, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof(on)) < 0) { perror("postmaster: StreamConnection: setsockopt(SO_KEEPALIVE)"); return STATUS_ERROR; } } A search via google for setsockopt MySQL and PostgreSQL should help. Once can only assume they are running as root - otherwise I guess they would fall into the same problem on Linux... Paul |