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 1jLxQj-0001W0-VH for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 23:14:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLxQi-0007K5-Rc for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 23:14:52 +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 1jLxQi-0007Jy-Hv for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2020 23:14:52 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLxQf-0002Ak-QK for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2020 23:14:52 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E3DDC21C595D; Wed, 8 Apr 2020 02:14:48 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from mail.postgrespro.ru (cyclops.l.postgrespro.ru [192.168.27.1]) (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 8845C21C591E; Wed, 8 Apr 2020 02:14:48 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1586301288; bh=n6pdJepXzYDNO2YrhagHVKFEkYglT5KBFPZ1/wLn2ec=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=F+koLcSWjK5VcdgULr+IxmeipAelz7kAxoi/49y3TPf8N1nUaM/0qfTc1YgwVTmeQ xnu6GJx4BOYMqek6mKPxkTSO+l2kDIWu8NRDPBCichFaCgjP9m5LOReP9vf1eN5Rrx GcNWVoycJNZobl+kKavL9oN27qUew1hzbLiiNjRA= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 08 Apr 2020 02:14:48 +0300 From: Kartyshov Ivan To: Alexander Korotkov Cc: Anna Akenteva , Amit Kapila , PostgreSQL Hackers , tgl@sss.pgh.pa.us Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed In-Reply-To: References: <80f267591b373db5588d580fdfb432f0@postgrespro.ru> <20200306.145445.1788163547829857988.horikyota.ntt@gmail.com> <3cc883048264c2e9af022033925ff8db@postgrespro.ru> <674ad239b725a11d89c21574e44e376b@postgrespro.ru> <69a363498b76cd079ae19c4ee93bced0@postgrespro.ru> <06bfb1e542a25c3ebfc4232be4d49555@postgrespro.ru> <9d112e474c311b6b4c20566314283638@postgrespro.ru> User-Agent: Roundcube Webmail/1.4.0 Message-ID: X-Sender: i.kartyshov@postgrespro.ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-04-08 00:27, Tom Lane wrote: > Alexander Korotkov writes: » WAIT FOR LSN lsn [ TIMEOUT timeout ] > > This seems like a really carelessly chosen syntax —- *three* new > keywords, when you probably didn't need any. Are you not aware that > there is distributed overhead in the grammar for every keyword? > Plus, each new keyword carries the risk of breaking existing > applications, since it no longer works as an alias-not-preceded-by-AS. > To avoid creating new keywords, we could change syntax in the following way: WAIT FOR => DEPENDS ON LSN => EVENT TIMEOUT => WITH INTERVAL So START TRANSACTION WAIT FOR LSN '0/3F07A6B1' TIMEOUT 5000; would instead look as START TRANSACTION DEPENDS ON EVENT '0/3F07A6B1' WITH INTERVAL '5 seconds'; [1] https://www.postgresql.org/message-id/28209.1586294824%40sss.pgh.pa.us -- Ivan Kartyshov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company