pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
To: Amit Kapila <amit.kapila16@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Greg Nancarrow <gregn4422@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: On login trigger: take three
Date: Thu, 28 Jan 2021 12:04:28 +0300
Message-ID: <893b1540-b2f4-c488-616d-7893cf83a7db@postgrespro.ru> (raw)
In-Reply-To: <CAA4eK1KA+wL8fBe9UkFYONkC8fxBH2ehm-ce3mmYcCq0LduTwQ@mail.gmail.com>
References: <0d46d29f-4558-3af9-9c85-7774e14a7709@postgrespro.ru>
	<CAFj8pRCRPjkdu8eZrAbNbi0t_8UGUcN2QJLv==_dpW7Mc_yftQ@mail.gmail.com>
	<CAFj8pRAhvfT5bf9xDqjyB_mmtG0nY+cJ4c-abWEHnYoxjBfSXg@mail.gmail.com>
	<28e0ccbd-9320-708e-9507-bac3b9b2a786@postgrespro.ru>
	<CAFj8pRASHVgwPhwKtfXPmJF8eGeY9ifLNxXD2YRJrmuZ1G=_RQ@mail.gmail.com>
	<CAFj8pRCG5DKv6B_5TdbANJKaYDpgmd2tT3+fUNUH+49_1w0=VQ@mail.gmail.com>
	<2416ad41-3bd7-df65-467f-85d8063a37f2@postgrespro.ru>
	<CAFj8pRB=PEj1hF9tR5wv1MtOvtCsX5t69xy_zoMPqO-CbonbPw@mail.gmail.com>
	<74923523-ed26-b76a-f9e0-95371147c732@postgrespro.ru>
	<CAFj8pRDBDCZcpxxSpvFGuqu+OmUtW_6dBNdE+sYijaqU4kFE-A@mail.gmail.com>
	<b296d667-ba8d-5aad-4b75-e4d7286ebc1f@postgrespro.ru>
	<CAFj8pRAsozLS0qz0DYutOt7aUbGs-=zWSKnMUZ+xK4A0NnfATA@mail.gmail.com>
	<CAFj8pRDh=soRA-Y7E5zdbcHFMkEgm3Nqo+vk49BLQqVjfkCq5A@mail.gmail.com>
	<CAD21AoDHLFOyBdA8SymiD-eW2a5vOMSO165B_TOFvtbihnO15g@mail.gmail.com>
	<CAA4eK1KA+wL8fBe9UkFYONkC8fxBH2ehm-ce3mmYcCq0LduTwQ@mail.gmail.com>



On 28.01.2021 5:47, Amit Kapila wrote:
> On Mon, Dec 28, 2020 at 5:46 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>> On Sat, Dec 26, 2020 at 4:04 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>>>
>>>
>>> so 26. 12. 2020 v 8:00 odesílatel Pavel Stehule <pavel.stehule@gmail.com> 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 @@
>>>> -<!-- doc/src/sgml/config.sgml -->
>>>> +\<!-- doc/src/sgml/config.sgml -->
>>>>
>>>> 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






view thread (171+ messages)  latest in thread

Message-ID: <893b1540-b2f4-c488-616d-7893cf83a7db@postgrespro.ru>
Permalink:  ../893b1540-b2f4-c488-616d-7893cf83a7db@postgrespro.ru/
Also on:    postgresql.org/message-id/893b1540-b2f4-c488-616d-7893cf83a7db@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: k.knizhnik@postgrespro.ru, amit.kapila16@gmail.com, sawada.mshk@gmail.com, pavel.stehule@gmail.com, gregn4422@gmail.com
  Subject: Re: On login trigger: take three
  In-Reply-To: <893b1540-b2f4-c488-616d-7893cf83a7db@postgrespro.ru>
  References: <0d46d29f-4558-3af9-9c85-7774e14a7709@postgrespro.ru> <CAFj8pRAhvfT5bf9xDqjyB_mmtG0nY+cJ4c-abWEHnYoxjBfSXg@mail.gmail.com> <28e0ccbd-9320-708e-9507-bac3b9b2a786@postgrespro.ru> <CAFj8pRASHVgwPhwKtfXPmJF8eGeY9ifLNxXD2YRJrmuZ1G=_RQ@mail.gmail.com> <CAFj8pRCG5DKv6B_5TdbANJKaYDpgmd2tT3+fUNUH+49_1w0=VQ@mail.gmail.com> <2416ad41-3bd7-df65-467f-85d8063a37f2@postgrespro.ru> <CAFj8pRB=PEj1hF9tR5wv1MtOvtCsX5t69xy_zoMPqO-CbonbPw@mail.gmail.com> <74923523-ed26-b76a-f9e0-95371147c732@postgrespro.ru> <CAFj8pRDBDCZcpxxSpvFGuqu+OmUtW_6dBNdE+sYijaqU4kFE-A@mail.gmail.com> <b296d667-ba8d-5aad-4b75-e4d7286ebc1f@postgrespro.ru> <CAFj8pRAsozLS0qz0DYutOt7aUbGs-=zWSKnMUZ+xK4A0NnfATA@mail.gmail.com> <CAFj8pRDh=soRA-Y7E5zdbcHFMkEgm3Nqo+vk49BLQqVjfkCq5A@mail.gmail.com> <CAD21AoDHLFOyBdA8SymiD-eW2a5vOMSO165B_TOFvtbihnO15g@mail.gmail.com> <CAA4eK1KA+wL8fBe9UkFYONkC8fxBH2ehm-ce3mmYcCq0LduTwQ@mail.gmail.com> <893b1540-b2f4-c488-616d-7893cf83a7db@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox