Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rrfxK-001zrj-GU for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Apr 2024 15:21:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rrfxJ-009VQX-8t for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Apr 2024 15:21:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rrfxI-009VQN-S7 for pgsql-hackers@lists.postgresql.org; Tue, 02 Apr 2024 15:21:45 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rrfxC-000Csi-O6 for pgsql-hackers@lists.postgresql.org; Tue, 02 Apr 2024 15:21:40 +0000 Received: from mail.postgrespro.ru (webmail.mstn.postgrespro.ru [192.168.2.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: i.kartyshov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 50EF8E20C32; Tue, 2 Apr 2024 18:21:34 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1712071294; bh=L3HwXFD+3YE5K1LU/rzq5N2MEekiT0UK/LeSsinqysc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:User-Agent: Message-ID:From; b=w3kC3Dh60BK5ndPXO4JsrxDGhfSlmQl9hnVugGNRzhGRUASDvjVKt4Xq3B0vALSIA QmV79+jPUDyeSj9/uIs+qx2Hhhu9cgejChSzre9L049j33TKFGetiSC6orLylXIdmf uqqfyRlfqVKwdJyzvMmcuh5Hi6iDZi7uO3K39J3y4YjYOTwo7jOWKMXzEvtSkoTqGw 50stCbNy2W70X4ha5uDwdsCYE/CNnm7cOFnq5ZvaQb5XGXK8n2N4RsL0azk87mm8sq ZXx+7g4Np33GC/3rIZWX6VTMn8kL0pF29e0COCJZQBkycQpk2eWP34ALOLmf2PHqhc SJ5XL3YHQu+CA== MIME-Version: 1.0 Date: Tue, 02 Apr 2024 18:21:34 +0300 From: Kartyshov Ivan To: Bharath Rupireddy Cc: Andy Fan , Alexander Korotkov , Euler Taveira , Thomas Munro , Peter Eisentraut , Amit Kapila , Dilip Kumar , Peter Smith , pgsql-hackers@lists.postgresql.org Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed In-Reply-To: References: <5358d911a08ef2952b1e9f74062426ee@postgrespro.ru> <88449be3-93e8-4d78-a0d8-c37e4cf26850@app.fastmail.com> <8aec133e-5d7f-4fa1-8223-257647dd1ccd@app.fastmail.com> <432592e4d09341d41bf5cad1df26b3f3@postgrespro.ru> <87le5wa1dw.fsf@163.com> <87h6gk9nvc.fsf@163.com> <6eb8c9f22b075964f502080dadc16cb2@postgrespro.ru> User-Agent: Roundcube Webmail/1.6.5 Message-ID: <929e86cb46190f3f42388b942dfec79a@postgrespro.ru> X-Sender: i.kartyshov@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 On 2024-04-02 13:15, Bharath Rupireddy wrote: > On Tue, Apr 2, 2024 at 3:41 PM Kartyshov Ivan > wrote: >> >> 8 years, we tried to add this feature, and now we suggest the best way >> for this feature is to commit the minimal version first. > > Just curious, do you or anyone else have an immediate use for this > function? If yes, how are they achieving read-after-write-consistency > on streaming standbys in their application right now without a > function like this? Just now, application runs pg_current_wal_lsn() after update and then waits on loop pg_current_wal_flush_lsn() until updated. Or use slow synchronous_commit. -- Ivan Kartyshov Postgres Professional: www.postgrespro.com