Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pvDBL-0006OE-Qh for pgsql-hackers@arkaria.postgresql.org; Sat, 06 May 2023 08:22:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pvDBK-0002Ws-4C for pgsql-hackers@arkaria.postgresql.org; Sat, 06 May 2023 08:22:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pvDBJ-0002Wj-RM for pgsql-hackers@lists.postgresql.org; Sat, 06 May 2023 08:22:17 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pvDBG-000pBn-G2 for pgsql-hackers@lists.postgresql.org; Sat, 06 May 2023 08:22:16 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f19b9d5358so26533415e9.1 for ; Sat, 06 May 2023 01:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683361332; x=1685953332; 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=zXVvLTfemfyzH7248NMta/Azo+zD9yCdf5H5VXIZh1s=; b=J2p+PkAU2dZ/PxVRc54qyVrv/jxkoUzzWM1n47biPYKJAE+QtOeTZna69sUTmHQdVV yiny6+a/Bn7RdpLtgKevBHI7OgDTjJ7OqpPn3IlsxfyfjLxjzS3XTx23sKW+eCxg7C97 y39qZn3bGY2q0G6gkFDC0Fc1rZiO7oGR3c1pENFBqlVbhrwhjPLHTpqzlyU1397jhjXC hSjgeCydV63U/8CYuuHJiI2eYUmF8aeEjxljZ3HTXKCSxW+xZ9IXaxeFPc6Ds3hwBB9h AhuDEJHiIP2foTgGadhEraQ/P4pAd7MYTyH4hKWy7cHcEfFl1rAITqx0B71YQMzYYMnc yQDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683361332; x=1685953332; 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=zXVvLTfemfyzH7248NMta/Azo+zD9yCdf5H5VXIZh1s=; b=c+6gstwSFI/0s1qEtzDD2SaZ5yLn+QlPsJmmXuJ2MDZukCk5xOCSK/5F9g8Hfdpp7D FZJeIKszQxIXFxuCzc9addIeDHOVj5OYhk4cWhqsoyKMoH1za2B3N7KdNCJ+H6i80Vcb ggmdZ7ogNjgm7E37oydiUotqlAsemqPcGLuFdplwjr1pUcibLcG4pyv6jaJbOYv1gH5v T/FcRJP1coJ2s/cp25PjpnGvUW9L3JWrcWBrnbMPAY2u8w7xD+SOmUoFXNH6raHihcHG sMve4Nvh8YF0HL6qDJdfXFb3mFbsEGdWSNGLcbwepNyVwNhYeO/DqvGtQzDg9pb9nqDm TBow== X-Gm-Message-State: AC+VfDxG5R7HovbtmrRoIbbH7c6HkhfQp3EdMaBuuuacZFvXAH11HOna g+Cr2/CMoWNpqDO4TcPfKR4= X-Google-Smtp-Source: ACHHUZ7WAcxuDO3xmwhVTC5Ja1+T8A/AsMmZt/CtXXsnLfT9s5jmbONjNprlmo+nkCONMxwxAMQC1w== X-Received: by 2002:adf:dc05:0:b0:2f5:aadb:4642 with SMTP id t5-20020adfdc05000000b002f5aadb4642mr2574238wri.41.1683361332262; Sat, 06 May 2023 01:22:12 -0700 (PDT) Received: from [10.95.68.107] ([54.239.6.177]) by smtp.gmail.com with ESMTPSA id o4-20020a5d4a84000000b003062b6a522bsm4671211wrq.96.2023.05.06.01.22.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 May 2023 01:22:11 -0700 (PDT) Message-ID: <2894687f-141d-85a9-e8c3-2151e5b7e662@gmail.com> Date: Sat, 6 May 2023 10:22:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Add two missing tests in 035_standby_logical_decoding.pl To: Amit Kapila Cc: vignesh C , "Yu Shi (Fujitsu)" , PostgreSQL Hackers References: <2fefa454-5a70-2174-ddbf-4a0e41537139@gmail.com> <8a13f0d8-71f3-773b-7135-5974fd53724b@gmail.com> <6711e200-0d5c-98c3-ba39-7d64a6936f7a@gmail.com> <2c544b9f-419d-d18e-47be-f3d6f3d24e4e@gmail.com> <3576f684-718d-ddd6-f4b0-f8ad64ad3330@gmail.com> Content-Language: en-US From: "Drouvot, Bertrand" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 5/6/23 4:10 AM, Amit Kapila wrote: > On Fri, May 5, 2023 at 7:53 PM Drouvot, Bertrand > wrote: >> >> On 5/5/23 2:28 PM, Amit Kapila wrote: >>> On Fri, May 5, 2023 at 5:36 PM Drouvot, Bertrand >> >> So, even on a successful test, we can see that the WAL file we expect to be removed on the standby has not been recycled on the primary before the test. >> > > Okay, one possibility of not removing on primary is that at the time > of checkpoint (when we compute RedoRecPtr), the wal_swtich and insert > is not yet performed because in that case it will compute the > RedoRecPtr as a location before those operations which would be 0000*3 > file. However, it is not clear how is that possible except from a > background checkpoint happening at that point but from LOGs, it > appears that the checkpoint triggered by test has recycled the wal > files. > >>> I think we need to add more DEBUG info to find that >>> out. Can you please try to print 'RedoRecPtr', '_logSegNo', and >>> recptr? >>> >> >> Yes, will do. >> > > Okay, thanks, please try to print similar locations on standby in > CreateRestartPoint(). > The extra information is displayed that way: https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR6822-R6830 https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR7269-R7271 https://github.com/bdrouvot/postgres/commit/a3d6d58d105b379c04a17a1129bfb709302588ca#diff-c1cb3ab2a19606390c1a7ed00ffe5a45531702ca5faf999d401c548f8951c65bR7281-R7284 There is 2 runs with this extra info in place: A successful one: https://cirrus-ci.com/task/6528745436086272 A failed one: https://cirrus-ci.com/task/4558139312308224 For both the testrun.zip is available in the Artifacts section. Sharing this now in case you want to have a look (I'll have a look at them early next week on my side). Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com