Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YRP2D-0003o4-7C for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Feb 2015 17:49:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YRP2C-0004nz-H3 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Feb 2015 17:49:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YRP2A-0004ns-Tn for pgsql-hackers@postgresql.org; Fri, 27 Feb 2015 17:49:06 +0000 Received: from mail-wi0-f180.google.com ([209.85.212.180]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YRP22-0000vE-Iu for pgsql-hackers@postgresql.org; Fri, 27 Feb 2015 17:49:05 +0000 Received: by widem10 with SMTP id em10so1827566wid.0 for ; Fri, 27 Feb 2015 09:48:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=0vcnLlxorZon3bUki4yR5lC7sYjYbiNg37uxQJlResg=; b=JR4ZUTHxWOGPVnxZIXFy8jC5YljX0v4skpICVIOtwuWwvGFvYoU3mCE48JmSyBW2jv 775+O3dD2bbRb2w2B9OUZt8ueKiaP7GRomYgxHhCTYv8U5fNy7OJqXHy45LtI2xJMYGE AZqSHFzwePLFhT1IeR16xYj3HiL4Sk1EAXyaETWlO/97cPumy5YZj+3qx1oaAaUpDEYP lZnaaZCOEdioQAVX86bR+PKWzZg5n2tAB0FK89UqNTTClYVi6mOGg6VLlrd9GjfLLjD3 yZoz0I1eBqzlj30w/mpZO7dLuRLxCC8lTd7UlnkUjVjjzBJkh38CdRt3poK1qPLEu4SF 6TlA== X-Gm-Message-State: ALoCoQmGv1Jei8wcNvnyapDajaLlAkxMvuex6n/LPF7D4tenhTi+Y+wr4x5J9CUbMK+MGkfLi03v46Se8Hge5igkXAsoxkqvXR7Zq+hWshiyBW35BPIHekDFmQcB1/asYZdnVCf/nSLZR7wpgJ0NktMeL3iSa6l7f1CMsW+N8m2moludp7OorI3hIYQXTnj4foTu/ndy58Oy X-Received: by 10.194.47.201 with SMTP id f9mr11941871wjn.17.1425059336427; Fri, 27 Feb 2015 09:48:56 -0800 (PST) Received: from [192.168.1.163] (ip-78-45-139-138.net.upcbroadband.cz. [78.45.139.138]) by mx.google.com with ESMTPSA id q10sm6882884wjr.41.2015.02.27.09.48.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 09:48:55 -0800 (PST) Message-ID: <54F0ADEE.6070004@2ndquadrant.com> Date: Fri, 27 Feb 2015 18:48:30 +0100 From: Tomas Vondra Organization: 2ndQuadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Stephen Frost CC: pgsql-hackers@postgresql.org Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission References: <82897A1301080E4B8E461DDAA0FFCF14DDE1@SYD1216> <82897A1301080E4B8E461DDAA0FFCF14FD6E@SYD1216> <20140629165554.GA5984@toroid.org> <20140630070646.GY31357@toroid.org> <54C8156E.1080500@BlueTreble.com> <54C95C4B.2080901@BlueTreble.com> <54F09D68.2090700@2ndquadrant.com> <20150227165950.GP29780@tamriel.snowman.net> In-Reply-To: <20150227165950.GP29780@tamriel.snowman.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 27.2.2015 17:59, Stephen Frost wrote: > All, > > * Tomas Vondra (tomas.vondra@2ndquadrant.com) wrote: >> >> The other feature that'd be cool to have is a debugging function >> on top of the view, i.e. a function pg_hba_check(host, ip, db, >> user, pwd) showing which hba rule matched. But that's certainly >> nontrivial. > > I'm not sure that I see why, offhand, it'd be much more than trivial > ... From time to time I have to debug why are connection attempts failing, and with moderately-sized pg_hba.conf files (e.g. on database servers shared by multiple applications) that may be tricky. Identifying the rule that matched (and rejected) the connection would be helpful. But yes, that's non-trivial and out of scope of this patch. -- Tomas Vondra http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers