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 1qiaKv-0071fi-Gf for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Sep 2023 13:00:17 +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 1qiaKt-009sS0-9s for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Sep 2023 13:00:15 +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 1qiaKs-009sRd-TE for pgsql-bugs@lists.postgresql.org; Tue, 19 Sep 2023 13:00:15 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qiaKq-005Ref-63 for pgsql-bugs@lists.postgresql.org; Tue, 19 Sep 2023 13:00:13 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50325ce89e9so2296917e87.0 for ; Tue, 19 Sep 2023 06:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695128410; x=1695733210; darn=lists.postgresql.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=hsRcCyyjaMRTZA33kkWCCCXG0gYW+peQxI94/RE5w0c=; b=UF/oxsXMsoKJTyQJcm8BqGe8iQME9IbJvCYIfsrMPNCFzAhiPUYIM/J/CeNSyvHVAg i2zl5oHWCslrtcookHfFtShktoB44Bo7odL6ze2+EU6zILEQRsCSRUKuK8mrgrAREe+Z Bqg2/p1xm8KSAvHxBOLOfZQWCf6VpoZPS1QU9+RVwAVFWHeJW7yswvLH3WXcMvAp0Bpc PVfpRXnOoGjOEoS0ON+9ciQMYKKA0s1gKduRP7lQSmtV9XPFyglO5yqvD8fcf3AooNpD gbNKPHt4Brzzy8QL8R8arqAJHIUOqLFbPnsrp9NZdAraaoBx2+EBqqE96KNHq7oTzfWL W4LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695128410; x=1695733210; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hsRcCyyjaMRTZA33kkWCCCXG0gYW+peQxI94/RE5w0c=; b=lRy8SJzbPHPSljHevppniRZtF8QynR2PGGp25CkCdQM18cd3T5+wN0nM+pCtq5/Ijq p5P6jb7QaVf3Tdw3ubEj2tbClyfqwzpQuYK4hlIx+zzLwKjHbrCLI/eNKdYPdMbpSP7u ZmngKcB78uzHLLUS7Y/tvmBMIKkECcpSddNg+jD1AI1yZBPG+kAsgrkCJPkkzsKaBJEm Ksynp+zONDeSC7lfV4izolK7pJT+oAFIGNvhj7yso/Jc3ngtMcNMEnNF4drCtlw1u17b /U0uMxfwlkjVJpXAAV6pMROYSiLN1lnjiPoT4SzNgg/dc4rKkjyUs8i7Qz6i56P70mF/ PmKQ== X-Gm-Message-State: AOJu0YzjaQAQoLRMntrSDBvu8SM0g7faj8Qek0u5YxxmLS8oNjIZ2qkB vqCA5Z/dXrg3/1uG3XLcbAw= X-Google-Smtp-Source: AGHT+IHrmM/UIlf+64djUzrc83VWekbaSwGA8hwra14Mkap1jkGlB871q9Wxy82duQeAKBse66Y98w== X-Received: by 2002:ac2:592f:0:b0:500:b64e:4f40 with SMTP id v15-20020ac2592f000000b00500b64e4f40mr10507902lfi.41.1695128409948; Tue, 19 Sep 2023 06:00:09 -0700 (PDT) Received: from [1.0.0.7] ([81.23.167.222]) by smtp.gmail.com with ESMTPSA id p13-20020a19f00d000000b00502d745f37dsm2258116lfc.95.2023.09.19.06.00.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Sep 2023 06:00:09 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------y5YDsa9762u8SaJkG81tuCBB" Message-ID: Date: Tue, 19 Sep 2023 16:00:06 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #17928: Standby fails to decode WAL on termination of primary Content-Language: en-US To: Thomas Munro , Michael Paquier Cc: Sergei Kornilov , Noah Misch , Tom Lane , Kyotaro Horiguchi , pgsql-bugs@lists.postgresql.org, Fujii Masao References: From: Alexander Lakhin In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------y5YDsa9762u8SaJkG81tuCBB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 19.09.2023 13:09, Thomas Munro wrote: > On Tue, Sep 19, 2023 at 9:53 PM Michael Paquier wrote: >> On Tue, Sep 19, 2023 at 09:25:34PM +1200, Thomas Munro wrote: >>> The problem was that the Perl functions advance_XXX() would sometimes >>> see an "unflushed" insert position caused by hint records and other >>> incidental stuff, and then we'd write our contrived header at a >>> disconnected location after a bunch of (unwritten) zeroes. The >>> solution in this version is to start each test with >>> emit_message($node, 0), which flushes a small record. >>> Thanks for the fixes! I've tested this patch version on Debian 9 and it works fine now. But as to wal_log_hints, I see that v7 patches work for REL_12_STABLE and REL_13_STABLE, but not for other branches, though v6 patches definitely failed on REL_12_STABLE and REL_13_STABLE too. So the behavior improved, but not for all versions, for some reason (I haven't looked deeper yet). Also I've noticed a few minor discrepancies in the patches. A commit message in patch.15 contains the sentence "We should fix ...", not "We could fix ...", as in commit messages for other versions. Also, patch.12 contains a duplicated "Reviewed-by" string. And may be "xlp_prev" is a typo? Best regards, Alexander --------------y5YDsa9762u8SaJkG81tuCBB Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
19.09.2023 13:09, Thomas Munro wrote:
On Tue, Sep 19, 2023 at 9:53 PM Michael Paquier <michael@paquier.xyz> wrote:
On Tue, Sep 19, 2023 at 09:25:34PM +1200, Thomas Munro wrote:
The problem was that the Perl functions advance_XXX() would sometimes
see an "unflushed" insert position caused by hint records and other
incidental stuff, and then we'd write our contrived header at a
disconnected location after a bunch of (unwritten) zeroes.  The
solution in this version is to start each test with
emit_message($node, 0), which flushes a small record.


Thanks for the fixes!

I've tested this patch version on Debian 9 and it works fine now.
But as to wal_log_hints, I see that v7 patches work for REL_12_STABLE and
REL_13_STABLE, but not for other branches, though v6 patches definitely
failed on REL_12_STABLE and REL_13_STABLE too. So the behavior improved,
but not for all versions, for some reason (I haven't looked deeper yet).
Also I've noticed a few minor discrepancies in the patches.
A commit message in patch.15 contains the sentence "We should fix ...",
not "We could fix ...", as in commit messages for other versions.
Also, patch.12 contains a duplicated "Reviewed-by" string.
And may be "xlp_prev" is a typo?

Best regards,
Alexander
--------------y5YDsa9762u8SaJkG81tuCBB--