Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO8sP-00065c-0X for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 21:43:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO8sN-0003yD-Nz for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 21:43:23 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO8sL-0003xK-Ux for pgsql-general@lists.postgresql.org; Wed, 30 May 2018 21:43:23 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO8sI-0001gk-3N for pgsql-general@postgresql.org; Wed, 30 May 2018 21:43:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3412621CE6; Wed, 30 May 2018 17:43:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 30 May 2018 17:43:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=y7JhAhmJrKybcji8UQ/M96XIKG7Me bKsTkFpVkhzWLY=; b=zgJd0+90EkofZ1A1dFQlZT0HiSxts9O3CC9tDE0TuvLaq aqoFcytUwoIeLP6/6KLl1WzLeR8Z2/cPX2FmU1LfDB12wZvT8cQX8D3SCFNGSM6x l5r2HcURpZVomo713ycIoV0Cs4jhLUvUw9H6Wlki4jvUohYjtnt3vwV81KwJGpZC DnWr6TZYW6qC2ABNGH3IMqv+ODZLRKMBllunHbUrpAo7CNL3TJf2+JBxg6LJMVQM PjNU++cKR42rjJgi5+yXw6y4sPay/twiRIFd9AhV117+I1s91KT09x58DMv1RFDM d7K7cNuN/jm64bXbpdTJW8ZX0aFOBa1ZRjPJzO8Xg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=y7JhAh mJrKybcji8UQ/M96XIKG7MebKsTkFpVkhzWLY=; b=HCktPpIqWzVp489TcIbjkY LaAFPJDOJBNaw17fFMObzIAq0ZBhp1ss+JmpCou7GNia41r1c0hTJgwUuxUR0J/5 yAvoOFbPMm0KgaDYw4WRUmyW03ox9njKbhykhCJHZvYGHYONm6arPW3Q1+z4d8uc Y3C0W6gsSsUM/HTdeKkFyTMKN6hwREvH23/qxez/gsQad0Cr+/Y2mrjFmdBpv4s6 k5eps/rVmiHDVx8lF+awE3dkb05DMe7erscViS5p5CHf8wZEhu+2bulmM0Df1YR+ dFc4IJKb1xwmyw8D/QRztQCDcrXOpk3VN8uxrwaHScTkWpFG4yCFY4ZpFwPkD6Lg == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.159.209]) by mail.messagingengine.com (Postfix) with ESMTPA id 5AC1AE4EAC; Wed, 30 May 2018 17:43:16 -0400 (EDT) Subject: Re: LDAP authentication slow To: C GG , Stephen Frost Cc: pgsql-general@postgresql.org References: <20180530160451.GS27724@tamriel.snowman.net> <20180530185018.GT27724@tamriel.snowman.net> From: Adrian Klaver Message-ID: <6990674a-9be4-e185-3cad-3af5f76fc821@aklaver.com> Date: Wed, 30 May 2018 14:43:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 05/30/2018 01:41 PM, C GG wrote: > > > Please let me be clear, this is not a question about whether or not to > use passwords. This is a question of how to determine the cause of and > remedy a slowdown retrieving data from PostgreSQL when using LDAP(S) to > authenticate PostgreSQL users. One of the sideline questions would be > how to achieve the same effect by using a different scheme. I should > further clarify that a major requirement would be that the scheme would > need to work in our current environment without having to re-engineer > the client applications. That would entail the need to pass a username > and password as we have traditionally done. > > Any friendly assistance with LDAP(S) to that end is welcome. Have been following this thread and have not answered previously as LDAP/AD is not something I really know about. Still strikes me as similar to another LDAP thread: https://www.postgresql.org/message-id/CAKeZVDov%2Bj2ZfUuSXNN-98_Nn_kAXr2e7UmKHhFNODHuEnUwUg%40mail.gmail.com In that post the OP found that supplying an IP address instead of a host name sped up the process. Have you tried that? It may not be a permanent solution, but it might help identify where the problem is. -- Adrian Klaver adrian.klaver@aklaver.com