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 1jN11b-0003mo-Bi for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Apr 2020 21:17:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jN11Z-0005EH-4Y for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Apr 2020 21:17:17 +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 1jN11Y-0005Cw-TL for pgsql-hackers@lists.postgresql.org; Fri, 10 Apr 2020 21:17:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jN11W-0005hN-Oi for pgsql-hackers@lists.postgresql.org; Fri, 10 Apr 2020 21:17:16 +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 03ALHAQI002025; Fri, 10 Apr 2020 17:17:10 -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: <20200410210641.5cub2minmnciydvv@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> <32218.1586550579@sss.pgh.pa.us> <20200410210641.5cub2minmnciydvv@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 10 Apr 2020 14:06:41 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2023.1586553430.1@sss.pgh.pa.us> Date: Fri, 10 Apr 2020 17:17:10 -0400 Message-ID: <2024.1586553430@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2020-04-10 16:29:39 -0400, Tom Lane wrote: >> Good point, but we could address that by making it a procedure no? > Probably. Don't think we have great infrastructure for builtin > procedures yet though? We'd presumably not want to use plpgsql. Don't think anyone's tried yet. It's not instantly clear that the amount of code needed would be more than comes along with new syntax, though. > ISTM that we can make it BEGIN AFTER 'xx/xx' or such, which'd not > require any keywords, it'd be easier to use than a procedure. I still don't see a good argument for tying this to BEGIN. If it has to be a statement, why not a standalone statement? (I also have a lurking suspicion that this shouldn't be SQL at all but part of the replication command set.) regards, tom lane