Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etAhr-0004xA-MX for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Mar 2018 11:24:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etAhp-0004m5-T0 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Mar 2018 11:24:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etAhp-0004lu-HX for pgsql-hackers@lists.postgresql.org; Tue, 06 Mar 2018 11:24:29 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etAhm-0005nb-DL for pgsql-hackers@postgresql.org; Tue, 06 Mar 2018 11:24:28 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 656A521C1C81 for ; Tue, 6 Mar 2018 14:24:24 +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-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 3F47021C1C7C for ; Tue, 6 Mar 2018 14:24:24 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1520335464; bh=9e/ZZUKzjRfz49E5Ng2SQVE0CHtUpkdQLSDaTxbR7+o=; h=Date:From:To:Subject:In-Reply-To:References; b=KQZ3n0Lv9g5XDa/mwJrHU7Szpv5D4wFIZgfmdkN9IJtiOrkzlCVtF+wPDdWcdjJqV yfJshjnyMaHehBEXaVvrHanKsQ94wpNK7D+Z3uXXhGIO11sIhVimArNhNziA7InM1g zEjKqEVY8hpCAMm9sHF54cx9JniMBuvghSV7/WCI= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 06 Mar 2018 14:24:24 +0300 From: Ivan Kartyshov To: PostgreSQL-development Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed In-Reply-To: <20180302004714.nf6mntdwdjsbexmk@alap3.anarazel.de> References: <0240c26c-9f84-30ea-fca9-93ab2df5f305@postgrespro.ru> <20180302004714.nf6mntdwdjsbexmk@alap3.anarazel.de> Message-ID: X-Sender: i.kartyshov@postgrespro.ru User-Agent: Roundcube Webmail/1.2.4 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund писал 2018-03-02 03:47: > On 2018-02-02 19:41:37 +0000, Simon Riggs wrote: >> On 2 February 2018 at 18:46, Robert Haas >> wrote: >> > On Fri, Feb 2, 2018 at 3:46 AM, Simon Riggs wrote: >> >> In PG11, I propose the following command, sticking mostly to Ants' >> >> syntax, and allowing to wait for multiple events before it returns. It >> >> doesn't hold snapshot and will not get cancelled by Hot Standby. >> >> >> >> WAIT FOR event [, event ...] options >> >> >> >> event is >> >> LSN value >> >> TIMESTAMP value >> >> >> >> options >> >> TIMEOUT delay >> >> UNTIL TIMESTAMP timestamp >> >> (we have both, so people don't need to do math, they can use whichever >> >> they have) >> > >> > WAIT FOR TIMEOUT sounds a lot like SELECT pg_sleep_for(), and WAIT >> > UNTIL TIMESTAMP sounds a lot like SELECT pg_sleep_until(). >> >> Yes, it sounds very similar. It's the behavior that differs; I read >> and agreed with yours and Thomas' earlier comments on that point. >> >> As pointed out upthread, the key difference is whether it gets >> cancelled on Hot Standby and whether you can call it in a non-READ >> COMMITTED transaction. > > Given that nobody has updated the patch or even discussed doing so, I > assume this would CF issue should now appropriately be classified as > returned with feedback? Hello, I now is preparing the patch over syntax that Simon offered. And in few day I will update the patch. Thank you for your interest in thread. -- Ivan Kartyshov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company