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 1nYowO-0002sC-N6 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Mar 2022 12:57:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nYowM-0007Zm-VM for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Mar 2022 12:57:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nYowM-0007Zc-GP for pgsql-hackers@lists.postgresql.org; Mon, 28 Mar 2022 12:57:46 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nYowI-0001ZC-Ml for pgsql-hackers@postgresql.org; Mon, 28 Mar 2022 12:57:45 +0000 Received: from mail.postgrespro.ru (cyclops.postgrespro.ru [93.174.131.138]) (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 137F521CA921; Mon, 28 Mar 2022 15:57:37 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1648472257; bh=SzAbEQK3sQj+mokGACxLSb4jw5UBLZXv8dyVftNgTxE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=VXe/2ru56/TYPj42f7TYZqxIgdqbdABETMd/dtpsloTngFzMUIyAvRnuEC7IcknK6 mi0AaJvwO7OsWDCZ+BWCM+acK9KK/xnC5ZQfx1akkxNzsbWKOnxw5iQ1i4upvGmIJK xRBgXWLMXo7FP17f3s3Qc3qIAtqRCv8fbnXsvrjs= MIME-Version: 1.0 Date: Mon, 28 Mar 2022 15:57:37 +0300 From: a.sokolov@postgrespro.ru To: Daniel Gustafsson Cc: Andres Freund , Tom Lane , Greg Nancarrow , Ivan Panchenko , Teodor Sigaev , Ibrar Ahmed , vignesh C , Pavel Stehule , PostgreSQL Hackers , Amit Kapila , Masahiko Sawada Subject: Re: On login trigger: take three In-Reply-To: <6E81EF7F-2FD0-4E8F-A1B2-465EA39F2876@yesql.se> References: <20220312024652.lvgehszwke4hhove@alap3.anarazel.de> <20220313233350.mar5ix6cqmgaokta@alap3.anarazel.de> <81327.1647215828@sss.pgh.pa.us> <20220314000825.t7yywdubftb5cwl6@alap3.anarazel.de> <2E4E472A-69F8-4EAC-B337-3341AC2F0188@yesql.se> <20220314161049.eybdzhwdrcn5s5zc@alap3.anarazel.de> <36a32ebce64ad85fd6e07edcdcda09f4@postgrespro.ru> <8157002C-02DB-4AC8-BC36-E7FE4604E1E0@yesql.se> <20220322024844.gpg3kl23mqvoncn2@alap3.anarazel.de> <6E81EF7F-2FD0-4E8F-A1B2-465EA39F2876@yesql.se> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <20798fcd14615193ce31005ca6c40ef2@postgrespro.ru> X-Sender: a.sokolov@postgrespro.ru Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson писал 2022-03-22 11:43: >> On 22 Mar 2022, at 04:48, Andres Freund wrote: > >> docs fail to build: >> https://cirrus-ci.com/task/5556234047717376?logs=docs_build#L349 > > Ugh, that one was on me and not the original author. Fixed. > + data initialization. It is vital that any event trigger using the + login event checks whether or not the database is in + recovery. Does any trigger really have to contain a pg_is_in_recovery() call? In this message (https://www.postgresql.org/message-id/20220312024652.lvgehszwke4hhove%40alap3.anarazel.de) it was only about triggers on hot standby, which run not read-only queries -- Andrey Sokolov Postgres Professional: http://www.postgrespro.com