The problem is that server_login_retry is only applied when the
backend server is down, but not when it returns an error upon
connection (e.g., authentication error). In that case, the client
sees the error immediately. Be that as it may, it breaks this test
sometimes, if a retry attempt hits the window where the server reports
"database is starting up". (This window should be tiny since no
notable recovery should be happening here, but it happens.) To fix,
adjust the settings so that the retries happen well away from the
backend server startup phase.