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 1rhqC2-00Dcs7-Hg for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 12:16:19 +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 1rhqBz-009e2O-Pt for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Mar 2024 12:16:16 +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 1rhqBz-009e2G-Gh for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 12:16:16 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rhqBt-0038X2-QA for pgsql-hackers@lists.postgresql.org; Wed, 06 Mar 2024 12:16:14 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d2305589a2so105460621fa.1 for ; Wed, 06 Mar 2024 04:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709727369; x=1710332169; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=oVxZJGH8RpqqAhLO9rKjVOYFU5iMQ9JhgUpJ70Wc0So=; b=TdmzPxuEme62q4UInXXlk1vS97dGKlaSPyMO1Vi3qm1KUTOpYHmgYNRD5TjhUaB3Fi 97h5pI8IwYmU7B6dtwbOnwSLDG8u0An0UG215rJMfAqe47WyD6K6AcvkBQ7H848Iv2Ln KscaFMNUdMbY1tv8QChBU+/NZa7FR1EF9oHlA5nNjuU4ujScnSGxWtVWsmul3YWBZeLD oQ5+qNop1xp+kF+hwsdjDTPOnr5HGGboSX/T54mlZq/wa0ZFMFjsHQdeU7cD7C33nHKG V0zt/KdMOahFPkumV9EMUJ/pSWTwIJVzKWis76DH1OQZKCvhWFeRmS4kv6LOAjZHkCLS EDfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709727369; x=1710332169; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oVxZJGH8RpqqAhLO9rKjVOYFU5iMQ9JhgUpJ70Wc0So=; b=ZdQ7RYmzPNENZHJ9ZWVrQnPtyOfj5L3uV/yM136oFssLSHW/ioRqoDgPwYcJbJGPO1 9M+4ciPcXDDhaMztvscFFG0Ukg5nsR39LyAb9GMZMl42wXhcGvVMkyJ/JptjeY24X8Rm pXeZ2wsn+MFPfFInf6jnnTu+THXaorOlUIMCPXbb1aqVaRdQxMfhAJhx9hZYlcWsD0rl BkOcIfrwV2D0Id5TI0g/xxznrkZsUgoSRF2Qu2URKgJ3sQbu4cCFNrsvxMiNpm8gUEb9 mdaxIPmq9TBOFWWmiTtTJD/HzBBXOemLC369eBMGRqL+D/TEbCqc/5iYQSx0ht3dU/QS oXRg== X-Forwarded-Encrypted: i=1; AJvYcCV2d8h6KkUkDz3KE9aABgYn9+hv9/rEEc7gIddB4v1jK9Zl3fKp4J+dD+uVrfwatuhiOWT6YIV52I9i4ileHfrb/MvPDAXIcVhRIWP1h0+RJqQZ X-Gm-Message-State: AOJu0YwEY0gJwBNxPeWKYFqeZRbXmsT/iKuyVH16aYdvMp2RWrHElmFv lL0PM3kJQZJaL3XT5/LHUaOwcbCnSl0pxUkl0dujQeFgeRxZ5NF7tOXd3hHE+gnJRuRLHRAcup3 QJZ3FbD2jb3rzvR2KBK8zSvzpYas= X-Google-Smtp-Source: AGHT+IGCPE1+x/RnNW4MeEbW7wJATl7YEbY0TTWUia6qLm3N7X05vHAWK+HHfY+4XcYtW0EJFiIHp2fZ687kfwEMkOY= X-Received: by 2002:a2e:3a09:0:b0:2d3:9314:24d5 with SMTP id h9-20020a2e3a09000000b002d3931424d5mr2979388lja.32.1709727368888; Wed, 06 Mar 2024 04:16:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bharath Rupireddy Date: Wed, 6 Mar 2024 17:45:56 +0530 Message-ID: Subject: Re: Fix race condition in InvalidatePossiblyObsoleteSlot() To: Michael Paquier Cc: Bertrand Drouvot , pgsql-hackers@lists.postgresql.org, exclusion@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 6, 2024 at 4:51=E2=80=AFPM Michael Paquier wrote: > > On Wed, Mar 06, 2024 at 09:17:58AM +0000, Bertrand Drouvot wrote: > > Right, somehow out of context here. > > We're not yet in the green yet, one of my animals has complained: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dhachi&dt=3D2024= -03-06%2010%3A10%3A03 > > This is telling us that the xmin horizon is unchanged, and the test > cannot move on with the injection point wake up that would trigger the > following logs: > 2024-03-06 20:12:59.039 JST [21143] LOG: invalidating obsolete replicati= on slot "injection_activeslot" > 2024-03-06 20:12:59.039 JST [21143] DETAIL: The slot conflicted with xid= horizon 770. > > Not sure what to think about that yet. Windows - Server 2019, VS 2019 - Meson & ninja on my CI setup isn't happy about that as well [1]. It looks like the slot's catalog_xmin on the standby isn't moving forward. [1] https://cirrus-ci.com/task/5132148995260416 [09:11:17.851] 285/285 postgresql:recovery / recovery/035_standby_logical_decoding ERROR 553.48s (exit status 255 or signal 127 SIGinvalid) [09:11:17.855] >>> INITDB_TEMPLATE=3DC:/cirrus/build/tmp_install/initdb-template enable_injection_points=3Dyes PG_REGRESS=3DC:\cirrus\build\src/test\regress\pg_regress.exe MALLOC_PERTURB_=3D172 REGRESS_SHLIB=3DC:\cirrus\build\src/test\regress\regress.dll PATH=3DC:/cirrus/build/tmp_install/usr/local/pgsql/bin;C:\cirrus\build\src/= test\recovery;C:/cirrus/build/src/test/recovery/test;C:\BuildTools\VC\Tools= \MSVC\14.29.30133\bin\HostX64\x64;C:\BuildTools\MSBuild\Current\bin\Roslyn;= C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\BuildTools\\MSBuild\Current\Bin;C:\Windows= \Microsoft.NET\Framework64\v4.0.30319;C:\BuildTools\Common7\IDE\;C:\BuildTo= ols\Common7\Tools\;C:\BuildTools\VC\Auxiliary\Build;C:\zstd\zstd-v1.5.2-win= 64;C:\zlib;C:\lz4;C:\icu;C:\winflexbison;C:\strawberry\5.26.3.1\perl\bin;C:= \python\Scripts\;C:\python\;C:\Windows Kits\10\Debuggers\x64;C:\Program Files\Git\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C= :\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\= ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\PowerShell\7\;C:\Program Files\Google\Compute Engine\sysprep;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Mi= crosoft\WindowsApps C:\python\python3.EXE C:\cirrus\build\..\src/tools/testwrap --basedir C:\cirrus\build --srcdir C:\cirrus\src/test\recovery --testgroup recovery --testname 035_standby_logical_decoding -- C:\strawberry\5.26.3.1\perl\bin\perl.EXE -I C:/cirrus/src/test/perl -I C:\cirrus\src/test\recovery C:/cirrus/src/test/recovery/t/035_standby_logical_decoding.pl [09:11:17.855] ------------------------------------- 8< ------------------------------------- [09:11:17.855] stderr: [09:11:17.855] # poll_query_until timed out executing this query: [09:11:17.855] # SELECT (SELECT catalog_xmin::text::int - 770 from pg_catalog.pg_replication_slots where slot_name =3D 'injection_activeslot') > 0 [09:11:17.855] # expecting this output: [09:11:17.855] # t [09:11:17.855] # last actual query output: [09:11:17.855] # f [09:11:17.855] # with stderr: [09:11:17.855] # Tests were run but no plan was declared and done_testing() was not seen. [09:11:17.855] # Looks like your test exited with 255 just after 57. --=20 Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com