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 1sH1m4-002ClK-Gk for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jun 2024 13:42:57 +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 1sH1m2-006bCQ-Of for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Jun 2024 13:42:55 +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 1sH1m2-006bCI-Ej for pgsql-hackers@lists.postgresql.org; Tue, 11 Jun 2024 13:42:55 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sH1lv-001749-Sr for pgsql-hackers@lists.postgresql.org; Tue, 11 Jun 2024 13:42:54 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-42278f3aea4so575095e9.1 for ; Tue, 11 Jun 2024 06:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1718113366; x=1718718166; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=V5O3asQIfxw6V/FVnQLtGUktz+wjdDsJdsOHFn7YMDY=; b=hZin3puE1amFM+tlMULICY7pFby3qwWDd075NTebnRvExeLPTyim9/CaPb3TAq8sKv AsgRLHdKDXlH6PtTgEiJOGRZgTbhkAqeSRpKB1za4WpwlH7+OOZf9+vKTyj9JESPHe6l lXEuKU6fe/O25ibO/zPEIF523urPvhxgUd36m5tUnZ90QptVPPOqQXh+3MN73RU1DKuD rlM/uqG8iHSAqsciwnvALqSHO/3z7OvQaKdSkybQ5ZYOp6UGYCYLuVSiN5vp+EGPriLn YxljVQDuCW4EnVNoQbs6Th69OwT49F7OutYY9yBHYttcRWkaguDrHhQSs/tPDsqn0KPc 5FOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718113366; x=1718718166; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V5O3asQIfxw6V/FVnQLtGUktz+wjdDsJdsOHFn7YMDY=; b=uh/x5sh0t1oDtSS+wzXzL82yHTKmYtn5y1Iw9yybDPp4M7vwAxqf6vLC6nCDRkM0lC H6jtqK1K+62b7Ns6/6e7txMFt6n3LZlppyUwPay7B9Nb/ElcXhP4PDHCoZOFPCGrGX4h FRJr2JN2Ih4YsojIdMFVAhQO55/iQyD9D6C8VRGL86Z3jpjLmJrcAW1gKqL1rkG53ZG4 3o925M40vfW5z5x4eMVT1moh39vM+8kuKyMw8AsfdGRpcY8B2QDld4kkD52W54ir3jsz PV8H12GowQSRSHQeOlseAvSG86jiOUlL8frAWEBuGBzWHKGOZlhWlztFpNmlGGxZpHdk qspQ== X-Gm-Message-State: AOJu0Yzk/teplNq5c8JJt0yvAe2k4ObROeRHK6ov/oD5iUvPibUXXf8J e4papd/IjO3e536DqkMYj9IN4GHhNVyhimQAixTGhMAJ1Qk6izkO/NAz1eDXEA== X-Google-Smtp-Source: AGHT+IEaDubQ8gHawa0dZD4lNgolW49WaUqA2KnUggWB8iQvlNZNO2j9Ilt+iAjgM9wYQkWgCPmbVA== X-Received: by 2002:a05:600c:524e:b0:422:6407:5caa with SMTP id 5b1f17b1804b1-42264075dcdmr10113815e9.33.1718113365993; Tue, 11 Jun 2024 06:42:45 -0700 (PDT) Received: from [10.137.0.18] (ip-86-49-229-30.bb.vodafone.cz. [86.49.229.30]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42217ff4302sm47055665e9.31.2024.06.11.06.42.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jun 2024 06:42:45 -0700 (PDT) Message-ID: Date: Tue, 11 Jun 2024 15:42:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: confirmed flush lsn seems to be move backward in certain error cases To: Amit Kapila , vignesh C Cc: PostgreSQL Hackers References: Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 6/11/24 10:39, Amit Kapila wrote: > On Mon, Jun 10, 2024 at 7:24 PM vignesh C wrote: >> >> I have re-verified the issue by running the tests in a loop of 150 >> times and found it to be working fine. Also patch applies neatly, >> there was no pgindent issue and all the regression/tap tests run were >> successful. >> > > Thanks, I have pushed the fix. > Sorry for not responding to this thread earlier (two conferences in two weeks), but isn't the pushed fix addressing a symptom instead of the actual root cause? Why should it be OK for the subscriber to confirm a flush LSN and then later take that back and report a lower LSN? Seems somewhat against my understanding of what "flush LSN" means. The commit message explains this happens when the subscriber does not need to do anything for - but then why shouldn't it just report the prior LSN, in such cases? I haven't looked into the details, but my concern is this removes an useful assert, protecting us against certain type of bugs. And now we'll just happily ignore them. Is that a good idea? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company