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 1kpsyB-0003Ua-C7 for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Dec 2020 13:05:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kpsyA-0000mD-9p for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Dec 2020 13:05:22 +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 1kpsyA-0000m6-3W for pgsql-hackers@lists.postgresql.org; Thu, 17 Dec 2020 13:05:22 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kpsy7-0005ia-RY for pgsql-hackers@lists.postgresql.org; Thu, 17 Dec 2020 13:05:21 +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 E3E8521C2299; Thu, 17 Dec 2020 16:05:18 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1608210318; bh=9Q9eG+LLcAUVcxoWrwGF/jEbEiOY6nD1L1Tkb8WcP7Q=; h=Subject:To:References:From:Date:In-Reply-To; b=pEp1xo9ou8TkBl0Qpl+1NBYdib843Cui4Z2B0akG1WvwapxOe9FlRieQLhU5tT5gt 0yNO1yUpk/ENwU9i1wHz2KwNOoMlZpNaJNPDxHD6+0KiAWgAn+mibVun4/Pnv4O1Ip 6BtDSanOjzacz6VC9J7/BMoWkq8Nj4qWIj6q38lQ= Subject: Re: On login trigger: take three To: Zhihong Yu , Pavel Stehule , PostgreSQL Developers References: From: Konstantin Knizhnik Message-ID: Date: Thu, 17 Dec 2020 16:05:18 +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: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 17.12.2020 3:31, Zhihong Yu wrote: > Hi, > For EventTriggerOnConnect(): > > +           PG_CATCH(); > +           { > ... > +               AbortCurrentTransaction(); > +               return; > > Should runlist be freed in the catch block ? No need: it is allocated in transaction memory context and removed on transaction abort. > > +           gettext_noop("In case of errors in the ON > client_connection EVENT TRIGGER procedure, this parameter can be used > to disable trigger activation and provide access to the database."), > > I think the text should be on two lines (current line too long). Thank you, fixed. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company