I have several variables configured in my .psqlrc file:
SET tcp_keepalives_idle = 15;
SET tcp_keepalives_interval = 10;
SET tcp_keepalives_count = 1;
SET client_connection_check_interval = 10;
These prevent my client connection to the server from being disconnected due to an idle timeout. However, there are times when the connection needs to be reset. When that happens, I'll see this client output:
no connection to the server
The connection to the server was lost. Attempting reset: Succeeded.
The problem is that when this happens, the settings in .psqlrc are not re-applied. Is there any way to force this to happen?
Btw, I know that these settings can also be applied server-side, but I do not have the option to do that.
Thanks.
Apparently this .pslrc
commands are not re-executed on connection reset. I think the only way to achieve what I want is to set these parameters server-side.