Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l53E9-0004mL-RB for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Jan 2021 09:04:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l53E8-0000En-Ou for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Jan 2021 09:04:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l53E8-0000Eg-DB for pgsql-hackers@lists.postgresql.org; Thu, 28 Jan 2021 09:04:32 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l53E5-0000FZ-Uw for pgsql-hackers@postgresql.org; Thu, 28 Jan 2021 09:04:32 +0000 Received: from [192.168.27.200] (unknown [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id D3AB721C332C; Thu, 28 Jan 2021 12:04:28 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1611824668; bh=FeMdVHgFkoQy8/uXkvtjp4ImFesrKY1uuk1FZwqvixA=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=Xb2EXFAkDExt3QQElj0bC9wCM4KZB2Yt0c0W3wpBx45QhpTCtcEhbcIFfexSmYWHc RKxZ0hdQ0yMUjwcbSnrOpQEM3d7Yb4nbrzV3K9dISRDffc5xzRtr/oxoM7rdU8ddwv BTEwnwn7z8Iz9gFAm0nPGEb8YJ+nFgMO9v5NR4Nc= Subject: Re: On login trigger: take three To: Amit Kapila , Masahiko Sawada Cc: Pavel Stehule , Greg Nancarrow , PostgreSQL Hackers References: <0d46d29f-4558-3af9-9c85-7774e14a7709@postgrespro.ru> <28e0ccbd-9320-708e-9507-bac3b9b2a786@postgrespro.ru> <2416ad41-3bd7-df65-467f-85d8063a37f2@postgrespro.ru> <74923523-ed26-b76a-f9e0-95371147c732@postgrespro.ru> From: Konstantin Knizhnik Message-ID: <893b1540-b2f4-c488-616d-7893cf83a7db@postgrespro.ru> Date: Thu, 28 Jan 2021 12:04:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 28.01.2021 5:47, Amit Kapila wrote: > On Mon, Dec 28, 2020 at 5:46 PM Masahiko Sawada wrote: >> On Sat, Dec 26, 2020 at 4:04 PM Pavel Stehule wrote: >>> >>> >>> so 26. 12. 2020 v 8:00 odesílatel Pavel Stehule napsal: >>>> Hi >>>> >>>> >>>>> Thank you. >>>>> I have applied all your fixes in on_connect_event_trigger-12.patch. >>>>> >>>>> Concerning enable_client_connection_trigger GUC, I think that it is really useful: it is the fastest and simplest way to disable login triggers in case >>>>> of some problems with them (not only for superuser itself, but for all users). Yes, it can be also done using "ALTER EVENT TRIGGER DISABLE". >>>>> But assume that you have a lot of databases with different login policies enforced by on-login event triggers. And you want temporary disable them all, for example for testing purposes. >>>>> In this case GUC is most convenient way to do it. >>>>> >>>> There was typo in patch >>>> >>>> diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml >>>> index f810789..8861f1b 100644 >>>> --- a/doc/src/sgml/config.sgml >>>> +++ b/doc/src/sgml/config.sgml >>>> @@ -1,4 +1,4 @@ >>>> - >>>> +\ >>>> >>>> I have not any objections against functionality or design. I tested the performance, and there are no negative impacts when this feature is not used. There is significant overhead related to plpgsql runtime initialization, but when this trigger will be used, then probably some other PLpgSQL procedures and functions will be used too, and then this overhead can be ignored. >>>> >>>> * make without warnings >>>> * make check-world passed >>>> * doc build passed >>>> >>>> Possible ToDo: >>>> >>>> The documentation can contain a note so usage connect triggers in environments with short life sessions and very short fast queries without usage PLpgSQL functions or procedures can have negative impact on performance due overhead of initialization of PLpgSQL engine. >>>> >>>> I'll mark this patch as ready for committers >>> >>> looks so this patch has not entry in commitfestapp 2021-01 >>> >> Yeah, please register this patch before the next CommitFest[1] starts, >> 2021-01-01 AoE[2]. >> > Konstantin, did you register this patch in any CF? Even though the > reviewer seems to be happy with the patch, I am afraid that we might > lose track of this unless we register it. > Yes, certainly: https://commitfest.postgresql.org/31/2900/ -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company