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 1rfdD1-001Gus-FM for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Feb 2024 10:00:12 +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 1rfdCy-002AAa-VG for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Feb 2024 10:00:09 +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 1rfdCy-002A8m-LW for pgsql-bugs@lists.postgresql.org; Thu, 29 Feb 2024 10:00:09 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rfdCt-00226r-RD for pgsql-bugs@lists.postgresql.org; Thu, 29 Feb 2024 10:00:08 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2d2ab9c5e83so7722901fa.2 for ; Thu, 29 Feb 2024 02:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709200803; x=1709805603; 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=1BvWti4lxUSmytUuMRYUjL5o041cA12gD74Ct3fCWmo=; b=EMXr0qaCKMxghVwIv1phcBPRnKQxqbipo2Gu3wI2HQg4duCbFBo2OohcPZW4WUTL7t WPzQtXQ92b/w3QHQNUci54R9o122o0WsjE+S219Wo6Ivcvi+oPXSens5sHu1lAzCHE+b j9yCwosJz74Krkw3wpBlLJjwOwF4YFNN26A5p9poW0eEAC78x02ESHAoFqArcCHztyRJ fIZ/MG4/qXKaYVS4XvdFiA0ZYKXvWffcPlc721FiMkeViTy9gGbC/vSOqbiFSIPLCFYH DaM0P50/PORsDVYNsyOIraLy1vF39LRayTEX+OzLyl2U70Ccly49l1dbAFKGyreOpxAX 6Dew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709200803; x=1709805603; 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=1BvWti4lxUSmytUuMRYUjL5o041cA12gD74Ct3fCWmo=; b=jxDVXIFQIBu3zO9vN+wYkvH29M5f2JtzOqfwq+Ig96no62uJLGnt1rttA6HTeaJcJH 5jPjoWoxzJBgbfe4CZPWx4zXUHxfQLkYZN4smhylZvZl5WkCLCcPdGUQc26A8Jqf6MzM S96OuOA6Jc7xFf74T86SiTm5PFDiOLn3CJG4Z4EvKxMS3Y3WVOEYYugZXvZS0wQVXoty 8C7Wgz9tcNVMuekBYm5soICewTQJfuVg+ZMKPShSWIRRI3c9+CKpGHkaq3x4ynLnS60C 8/GMUmD5BSNUtNoJKJWQuhwLYCtf4P/q7RzQ8eTCsoxdHGcYFFG5f+prL0FPWSVWXXZS zmog== X-Gm-Message-State: AOJu0Yy7gBSM6Jgn/96YT0tAvl4zZ3A9JWJjuq1NsrOAAZceyB1ivVtZ fuqbqxYQA2Xfzz1wp19XMyXEzaUa/28Fii/Dx5eyHqtefw1OG31s X-Google-Smtp-Source: AGHT+IEm9M6Vpsm+ih3kBWEgEEDmZaevYM/8aK3de/OCQ6F71mtf+81Kj0SSW7xje/Iy2dC/+0EfPw== X-Received: by 2002:a05:6512:250:b0:512:f833:38d9 with SMTP id b16-20020a056512025000b00512f83338d9mr1173965lfo.30.1709200802775; Thu, 29 Feb 2024 02:00:02 -0800 (PST) Received: from [1.0.0.7] ([178.155.17.148]) by smtp.gmail.com with ESMTPSA id p9-20020ac24ec9000000b0051320445f42sm193630lfr.10.2024.02.29.02.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Feb 2024 02:00:02 -0800 (PST) Content-Type: multipart/alternative; boundary="------------yjFCxMiTFyqvPb9pnBpYUbyw" Message-ID: Date: Thu, 29 Feb 2024 13:00:00 +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 #18369: logical decoding core on AssertTXNLsnOrder() Content-Language: en-US To: ocean_li_996 Cc: pgsql-bugs@lists.postgresql.org, Amit Kapila References: <18369-ad61699bf91c5bc0@postgresql.org> <6d0e80d6.c1fc.18deeb8120a.Coremail.ocean_li_996@163.com> <3d696d51.cfa6.18deeccd483.Coremail.ocean_li_996@163.com> <3900f282.3f49.18df2ae796a.Coremail.ocean_li_996@163.com> From: Alexander Lakhin In-Reply-To: <3900f282.3f49.18df2ae796a.Coremail.ocean_li_996@163.com> 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. --------------yjFCxMiTFyqvPb9pnBpYUbyw Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Haiyang, 29.02.2024 05:25, ocean_li_996 wrote: > > With your patch applied (on REL_14_STABLE) I still get: > > TRAP: FailedAssertion("builder->next_phase_at == InvalidTransactionId", File: "snapbuild.c", Line: 1623, PID: 92772) > > > > when running make -s installcheck-force -C contrib/test_decoding... > > as specified in that message. > > (You might need to disable REGRESS tests in the Makefile to reach > > isolation tests.) > I'm not sure if I fully get your mind. I disabled the REGRESS tests in the test_decoding/Makefile and then manually > run the command "make -s installcheck-force -C contrib/test_decoding" a few times. I didn't encounter the issue you > mentioned. Is this problem consistently reproducible in your environment? BTW, the  issue mentioned in [1] is more > similar to your problem. And the patch was not applied to v14.  Maybe it is another issue. > You can try the following script (assuming a server with the test_decoding module installed is running): rm -rf contrib/test_decoding_* numclients=5 for ((c=1;c<=numclients;c++)); do    cp -r contrib/test_decoding contrib/test_decoding_$c    sed "s/REGRESS = /# REGRESS =/" -i contrib/test_decoding_$c/Makefile    sed "s/isolation_slot/isolation_slot_$c/" -i contrib/test_decoding_$c/specs/catalog_change_snapshot.spec # Use independent slots    sed "$(printf '$p; %.0s' `seq 50`)" -i contrib/test_decoding_$c/specs/catalog_change_snapshot.spec # Repeat the last permutation 50 times done for ((c=1;c<=numclients;c++)); do    EXTRA_REGRESS_OPTS="--dbname=regress_$c" make -s installcheck-force -C contrib/test_decoding_$c USE_MODULE_DB=1 >"installcheck-$c.log" 2>&1 & done wait Though that's really not directly related to the current issue (sorry for the wrong direction, my point was that there are still living bugs in this area). I've found that your added test case fails on REL_15_STABLE starting from b793a416b (6b77048e5 on REL_14_STABLE), so it looks like this is a new defect introduced in REL_14_STABLE, REL_15_STABLE recently with the fix for bug #18280. As to REL_13_STABLE/REL_12_STABLE the failure reproduced starting from commits 38dbaaf27/02600886c, a result of the aforementioned discussion: https://www.postgresql.org/message-id/CAA4eK1Lx%3Dg09z2k9Teq9ca1eRzfpfxJwFdjyHNwgEKv69KWhrQ%40mail.gmail.com Best regards, Alexander --------------yjFCxMiTFyqvPb9pnBpYUbyw Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hi Haiyang,

29.02.2024 05:25, ocean_li_996 wrote:
> With your patch applied (on REL_14_STABLE) I still get:
> TRAP: FailedAssertion("builder->next_phase_at == InvalidTransactionId", File: "snapbuild.c", Line: 1623, PID: 92772)
>
> when running make -s installcheck-force -C contrib/test_decoding...
> as specified in that message.
> (You might need to disable REGRESS tests in the Makefile to reach
> isolation tests.)
I'm not sure if I fully get your mind. I disabled the REGRESS tests in the test_decoding/Makefile and then manually run the command "make -s installcheck-force -C contrib/test_decoding" a few times. I didn't encounter the issue you mentioned. Is this problem consistently reproducible in your environment? BTW, the  issue mentioned in [1] is more similar to your problem. And the patch was not applied to v14.  Maybe it is another issue.


You can try the following script (assuming a server with the test_decoding
module installed is running):
rm -rf contrib/test_decoding_*
numclients=5
for ((c=1;c<=numclients;c++)); do
   cp -r contrib/test_decoding contrib/test_decoding_$c
   sed "s/REGRESS = /# REGRESS =/" -i contrib/test_decoding_$c/Makefile
   sed "s/isolation_slot/isolation_slot_$c/" -i contrib/test_decoding_$c/specs/catalog_change_snapshot.spec # Use independent slots
   sed "$(printf '$p; %.0s' `seq 50`)" -i contrib/test_decoding_$c/specs/catalog_change_snapshot.spec # Repeat the last permutation 50 times
done
for ((c=1;c<=numclients;c++)); do
   EXTRA_REGRESS_OPTS="--dbname=regress_$c" make -s installcheck-force -C contrib/test_decoding_$c USE_MODULE_DB=1  >"installcheck-$c.log" 2>&1 &
done
wait

Though that's really not directly related to the current issue (sorry for
the wrong direction, my point was that there are still living bugs in this
area).

I've found that your added test case fails on REL_15_STABLE starting from
b793a416b (6b77048e5 on REL_14_STABLE), so it looks like this is a new
defect introduced in REL_14_STABLE, REL_15_STABLE recently with the fix for
bug #18280.

As to REL_13_STABLE/REL_12_STABLE the failure reproduced starting from
commits 38dbaaf27/02600886c, a result of the aforementioned discussion:
https://www.postgresql.org/message-id/CAA4eK1Lx%3Dg09z2k9Teq9ca1eRzfpfxJwFdjyHNwgEKv69KWhrQ%40mail.gmail.com

Best regards,
Alexander
--------------yjFCxMiTFyqvPb9pnBpYUbyw--