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 1rBX38-00BErp-DK for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Dec 2023 09:21:35 +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 1rBX28-005yct-OJ for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Dec 2023 09:20:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rBX28-005ya3-At for pgsql-hackers@lists.postgresql.org; Fri, 08 Dec 2023 09:20:32 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rBX25-00AhYO-V6 for pgsql-hackers@lists.postgresql.org; Fri, 08 Dec 2023 09:20:31 +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 41C62E20FD5; Fri, 8 Dec 2023 12:20:28 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1702027228; bh=XqZyDZKt4ObI41mg+/RgJUx1gImASoj2gXoCg1YCNHk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:User-Agent: Message-ID:From; b=YggOuSC8YJUabvQGVhfFFSQcGcxYRUW1Dj/fS5W5IDkoXoQNog7iDoTh4QtFA9alO BzZrMMA1WRMTWTeDthV7zN47ZkXOk+mcTEOP9RtoYQ0x5T/6yT1lYVXHxAnGU5V4Jw ccCSUnVtHmoMnPI3RQly5f4qg9QTob9n4S2xZsMnfUZ/hH7VccE5XHCLixllfxf7PE N2PEWVhDosEIzUUKnWswlY1DOhdTibIzA2dCZwpjZMdof4xsXrzUvZ/cajCtISUWyf PA2Tz/lz71yUTNNqWpRwExmq8FuLQLw57ktJUfTwULhY7mzT46WKr8K+/nMI1oLkc8 7dg9S/l3DRg4Q== MIME-Version: 1.0 Date: Fri, 08 Dec 2023 12:20:28 +0300 From: Kartyshov Ivan To: Alexander Korotkov Cc: pgsql-hackers@lists.postgresql.org Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed In-Reply-To: References: <22f122-655b3e80-3-688b3700@97587957> User-Agent: Roundcube Webmail/1.6.5 Message-ID: <2c7ed9b13cf776c918234153d95a1b3c@postgrespro.ru> X-Sender: i.kartyshov@postgrespro.ru Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-11-27 03:08, Alexander Korotkov wrote: > I've retried my case with v6 and it doesn't fail anymore. But I > wonder how safe it is to reset xmin within the user-visible function? > We have no guarantee that the function is not called inside the > complex query. Then how will the rest of the query work with xmin > reset? Separate utility statement still looks like more safe option > for me. As you mentioned, we can`t guarantee that the function is not called inside the complex query, but we can return the xmin after waiting. But you are right and separate utility statement still looks more safe. So I want to bring up the discussion on separate utility statement again. -- Ivan Kartyshov Postgres Professional: www.postgrespro.com