Oliver Jowett <[EMAIL PROTECTED]> writes:
> Here's a patch that adds four new GUCs:

>   tcp_keepalives (defaults to on, controls SO_KEEPALIVE)
>   tcp_keepalives_idle (controls TCP_KEEPIDLE)
>   tcp_keepalives_interval (controls TCP_KEEPINTVL)
>   tcp_keepalives_count (controls TCP_KEEPCNT)

Do you think the system defaults are really going to be port-specific?
I'm slightly annoyed by the number of syscalls this adds to every
connection startup ... getting rid of redundant getsockopt calls would
help.  Getting rid of redundant setsockopt calls (ie, a call to
establish the value that we already know is in force) would help more.

Alternatively, we could lose the frammish that PostgreSQL can tell you
what the system defaults are: 0 in the GUC just means "do nothing",
not "find out what the current setting is on the off chance that the
user might want to know".

Or, if you really think that's important, it could be left to the SHOW
routines to extract the value on-demand.  That is:
        GUC = 0: do nothing at connection start
        GUC != 0: setsockopt at connection start
        SHOW: do getsockopt and report result

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to