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 1jN0Ha-0002eX-9Z for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Apr 2020 20:29:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jN0HZ-0002I5-2l for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Apr 2020 20:29:45 +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 1jN0HY-0002Hu-S6 for pgsql-hackers@lists.postgresql.org; Fri, 10 Apr 2020 20:29:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jN0HW-0000LL-La for pgsql-hackers@lists.postgresql.org; Fri, 10 Apr 2020 20:29:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 03AKTdhT032219; Fri, 10 Apr 2020 16:29:39 -0400 From: Tom Lane To: Andres Freund cc: Fujii Masao , Alexey Kondratov , Kyotaro Horiguchi , a.akenteva@postgrespro.ru, a.korotkov@postgrespro.ru, i.kartyshov@postgrespro.ru, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed In-reply-to: <20200410193301.2qsbuoieppkst7xj@alap3.anarazel.de> References: <20200408.100945.375702947246835193.horikyota.ntt@gmail.com> <13716.1586378146@sss.pgh.pa.us> <20200409.161107.580344062273684114.horikyota.ntt@gmail.com> <880834ee-4b18-6d5d-9dae-6520c5eb2bef@oss.nttdata.com> <27171.1586439221@sss.pgh.pa.us> <759206c1-265f-97da-d135-fcecbced646b@oss.nttdata.com> <20200410193301.2qsbuoieppkst7xj@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 10 Apr 2020 12:33:01 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32217.1586550579.1@sss.pgh.pa.us> Date: Fri, 10 Apr 2020 16:29:39 -0400 Message-ID: <32218.1586550579@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I don't think a function is a good idea - it'll cause a snapshot to be > held while waiting. Which in turn will cause hot_standby_feedback to not > be able to report an increased xmin up. And it will possibly hit > snapshot recovery conflicts. Good point, but we could address that by making it a procedure no? regards, tom lane