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.98.2) (envelope-from ) id 1xMhWx-000000029qm-0Bc5 for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Oct 2026 08:00:07 +0000 Received: from localhost ([127.0.0.1]:54174 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xMhWw-000000096eq-1qQ9 for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Oct 2026 08:00:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:44410) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMhWw-000000096eh-02ex for pgsql-hackers@lists.postgresql.org; Fri, 30 Oct 2026 08:00:06 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xMhWt-00000001fI9-1d2f for pgsql-hackers@postgresql.org; Fri, 30 Oct 2026 08:00:05 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-48e3b22e971so161349f8f.0 for ; Fri, 30 Oct 2026 01:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793347202; x=1793952002; darn=postgresql.org; h=in-reply-to:content-language:from:references:cc:to:subject :user-agent:mime-version:date:message-id:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=j8tgiajE1NOyRZ04hcPudkfI3mhmUufzIPnpBiT3tiE=; b=XMcNI+FRVqLEkJi+CLGoWmPZzKErj/0LDk8SY92q/bl8bA/OUVdfcGmDTgqEauHbKv B6tk3sjBinW8/GVk3bCLPbKAIM8a4H/VDg5tVNiVK5e3SxK1/4fA3PuXugpzsHuROfnE OqjQbHx1bvllSMgn00aS3nByIiDgxrw8gRiP36JaEdf1HSIIGdjd6nTIMGyDkS+B7B2T c22hbiG/Dr61qKaCFW56+uSY6kpt7AczSfT4ywPOHnL39H0h5BRtFIGCbCh8rMv/ZykT ICgB+yPHtkacza8I3n8feto6J+HMePUjLtH/xPfR4IjLmFXN3dsqxW8jAGxwFWQKSEUi 1Dsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793347202; x=1793952002; h=in-reply-to:content-language:from:references:cc:to:subject :user-agent:mime-version:date:message-id:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=j8tgiajE1NOyRZ04hcPudkfI3mhmUufzIPnpBiT3tiE=; b=FpNZf3bhqg+y9iljnNrt1lMJLRqd/2kYwFc+sw9vL78fNAvy1tjP8PqZtrZdPYz/Cz Fjc/MuWg5Q3NYIAH1uE9vN5Nz7Fw/uaViS1wcDRsv11quoF6qUP+Z7f64/xGTvHRoJFj vQKWjnpqzJAlzQlmoSBNW+h+pT2DnOWBhVp1r5K1EmB8FpDgQc4IhM1IVnfC5ZQclvm0 ZPudjorKFFQDgOSoqMH4krSVMVX2KsIKFcsIRgQQE/bcfiksKQGsrPc1zHRfe/QgmVbx KBXutWLVwMZCLPW46KOnsJ/RWW7UXfC34pKUYYC2epfWz9UsAPghHuG7ITzYCsEtvQMF 5bYg== X-Forwarded-Encrypted: i=1; AKwUvBzOknlRID8GwH5gQmK4c6dLFJwlcXtBwjFrIKB0ENOtiAycCCVDo3P46KxTQDtKyxkebEL8cmqxbX2twyhb@postgresql.org X-Gm-Message-State: AFq9FYKOXv5SC0MsCPA+7IsRHMcoZKqSYZklNVkSUOqmyO0to6mYu30y RT0iB/J/ey5kkCy5GGajkxU+ANH8PgFJGqQLEXUdJ0jKkpFxcjG+ZNVK X-Gm-Gg: AYBFou3KrZkwCyAxnGEdcHtxHpUXGW2frkEGgjHMeli//QAb3B/cY1v1PW0rKQJSWfR IdzZkIfqJtqlcfWNpBu6XnT8i+YnxD+k89l+qNo9T55YriNJbb9H59n/UsqEdm+kez3A44MZwGk IzNi2NlPR+gv2pX/AkuFKTIBd4qzX4iy6EJjwtXhdkenK+7gcfe9A/B0Mw+GQK2nfUdkZGzzgiN YZLDUFjy1gOlxDBsDc1q5/BnIh6JLHgKUgx8mszOtBAFGW+WokzVaeVUTP+pMsCB0/PL9KdN0V6 L6324uHn9XEHWlAdPcPQpxZVVx5wrn3ekgkrHTCPg+RG421sQCHsd+eUdSKXoKpGADsvKfrlvv1 9ZLRbaQwszM2XxC1Wh5vY5qlTguonups/qjg1J63S7ZP84FSr29uEUyzSpV7QBaT/CUtOjE4+2B tNa1xjeKbCeqtPkt87lejlugaGNgEcII55/RGNlNOvxo4NqCGcmikqt+YwnCGwQQyGXytgNLVH3 tszEc2kQlp7aWiOqCwW5FYZ2RfL/BqxiWHBDPddyaa4aQ+I45B9K131f/LJCMdGaeoGIv5fCi3Y dHDGqHYEzp+xa8CfRgNS5gnX79eypUI= X-Received: by 2002:a05:6000:4b04:b0:48d:f391:5c45 with SMTP id ffacd0b85a97d-48e6e4f8ae4mr3827754f8f.42.1793347201722; Fri, 30 Oct 2026 01:00:01 -0700 (PDT) Received: from [192.168.0.50] ([89.149.93.246]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b80306sm2000652f8f.33.2026.10.30.01.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2026 01:00:01 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------8Cu3Cf38gDQDOGWHcDj4uATg" Message-ID: <8ccd0497-c914-47e2-804d-299b678863bf@gmail.com> Date: Fri, 30 Oct 2026 10:00:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation To: Masahiko Sawada Cc: Tom Lane , Amit Kapila , Srinath Reddy Sadipiralla , pgsql-hackers References: <1714235.1785459166@sss.pgh.pa.us> From: Alexander Lakhin Content-Language: en-US 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. --------------8Cu3Cf38gDQDOGWHcDj4uATg Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello Sawada-san, 31.07.2026 06:49, Masahiko Sawada wrote: > What does the buildfarm member produce the above logs? Many buildfarm > members failed with that error due to commit 6a80179f6b0, but I've not > seen further failures since pushing commit 18f9785e0b3. It took 3 months for buildfarm animals to discover an instability of the fixed test: [03:38:56.925](0.036s) # injection_point 'logical-decoding-activation' is reached [03:38:56.997](0.072s) ok 37 - the activation process aborted [03:38:57.013](0.016s) # connect output: # { #   'stderr' => 'background_psql: ready # ', #   'stdout' => 'background_psql: ready # ' # } [03:42:33.612](216.599s) # poll_query_until timed out executing this query: # #         SELECT count(*) > 0 FROM pg_stat_activity #         WHERE backend_type = 'client backend' AND wait_event = 'logical-decoding-activation' # # expecting this output: # t # last actual query output: # f # with stderr: [03:42:33.613](0.000s) # die: timed out when waiting for client backend to reach wait event 'logical-decoding-activation' at /home/bf/bf-build/melonworm/HEAD/pgsql/src/test/recovery/t/051_effective_wal_level.pl line 515. [03:42:33.613](0.000s) 1..37 timed out when waiting for client backend to reach wait event 'logical-decoding-activation' at /home/bf/bf-build/melonworm/HEAD/pgsql/src/test/recovery/t/051_effective_wal_level.pl line 515. I can reproduce this reliably with a simple sleep: @@ -180,6 +180,7 @@ injection_points_cleanup(int code, Datum arg)         if (!injection_point_local)                 return; +pg_usleep(1000000);         /* Detach all the local points */         foreach(lc, inj_list_local)         { Could you please have a look? `check-world` with this sleep reveals also other tests suffering from the same disease: src/test/modules/test_misc/t/010_index_concurrently_upsert.pl repack_toast repack_missingval repack_temporal repack_temporal_multirange [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=melonworm&dt=2026-10-30%2002%3A36%3A29 Best regards, Alexander --------------8Cu3Cf38gDQDOGWHcDj4uATg Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello Sawada-san,

31.07.2026 06:49, Masahiko Sawada wrote:
What does the buildfarm member produce the above logs? Many buildfarm
members failed with that error due to commit 6a80179f6b0, but I've not
seen further failures since pushing commit 18f9785e0b3.

It took 3 months for buildfarm animals to discover an instability of the
fixed test:
[03:38:56.925](0.036s) # injection_point 'logical-decoding-activation' is reached
[03:38:56.997](0.072s) ok 37 - the activation process aborted
[03:38:57.013](0.016s) # connect output:
# {
#   'stderr' => 'background_psql: ready
# ',
#   'stdout' => 'background_psql: ready
# '
# }
[03:42:33.612](216.599s) # poll_query_until timed out executing this query:
#
#         SELECT count(*) > 0 FROM pg_stat_activity
#         WHERE backend_type = 'client backend' AND wait_event = 'logical-decoding-activation'
#     
# expecting this output:
# t
# last actual query output:
# f
# with stderr:
[03:42:33.613](0.000s) # die: timed out when waiting for client backend to reach wait event 'logical-decoding-activation' at /home/bf/bf-build/melonworm/HEAD/pgsql/src/test/recovery/t/051_effective_wal_level.pl line 515.
[03:42:33.613](0.000s) 1..37
timed out when waiting for client backend to reach wait event 'logical-decoding-activation' at /home/bf/bf-build/melonworm/HEAD/pgsql/src/test/recovery/t/051_effective_wal_level.pl line 515.

I can reproduce this reliably with a simple sleep:
@@ -180,6 +180,7 @@ injection_points_cleanup(int code, Datum arg)
        if (!injection_point_local)
                return;
 
+pg_usleep(1000000);
        /* Detach all the local points */
        foreach(lc, inj_list_local)
        {

Could you please have a look?

`check-world` with this sleep reveals also other tests suffering from the
same disease:
src/test/modules/test_misc/t/010_index_concurrently_upsert.pl
repack_toast
repack_missingval
repack_temporal
repack_temporal_multirange

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=melonworm&dt=2026-10-30%2002%3A36%3A29

Best regards,
Alexander
--------------8Cu3Cf38gDQDOGWHcDj4uATg--