Stephen Frost <sfrost@xxxxxxxxxxx> writes: > * Adam Sjøgren (asjo@xxxxxxxxxxxx) wrote: >> Sometimes new database logins slow down, from usually taking <0.05s to >> taking minutes. This is for psql as a normal user using Kerberos, for >> psql as the postgres superuser, for the web-application logging into the >> database, for everything. > When in doubt, blame DNS. The trouble with outside-the-database explanations is that it's not clear why stopping the worker processes would make such issues go away. I think looking into pg_stat_activity and pg_locks might be interesting, although it's possible the delay is before the new session has made any entries there. Also, obtaining stack traces from a few of the stuck processes would likely be quite informative. regards, tom lane