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 1tqPlL-004aiw-0C for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Mar 2025 04:56:43 +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 1tqPlI-005PMr-Vn for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Mar 2025 04:56:41 +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 1tqPlI-005PMR-LF for pgsql-hackers@lists.postgresql.org; Fri, 07 Mar 2025 04:56:40 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqPlF-001RGX-0Y for pgsql-hackers@lists.postgresql.org; Fri, 07 Mar 2025 04:56:40 +0000 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2f42992f608so2665920a91.0 for ; Thu, 06 Mar 2025 20:56:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741323396; x=1741928196; 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=tRchOhzXA8eOV06SD1mwROJj3KVzLCeBRorIXZab8co=; b=GigOk2NX7FZk/Wlhmlr62R3yiYDF2kRgwL7RIKUv9ydjcm6+dA12eDxHbuw0hsAGbD 6mMi9m3ulR5wuEMfI2eSEh1vOuRVf3ph4qRTA9btE4rpjtmdGsVc6bRrZc1o1+HP+zrA s9pBmiQ+p1KH8AvqiR6jCRLpJgdFib7dZ20o082YFt4aAc6WUQvrEHXH0AQ8JCoBzpFH sMZl0dXCm1aacQ429hK5osbRG87eCBr98E/aosLlCoQwsQTk2TTZiOV0ENNikPKSWFnO g50jjv6jBNC7boBf/bh36kHfzi+4XYVXgNMUtDDZAmVDwWlsZzhuq/qGfEtb957MqSU4 yidQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741323396; x=1741928196; 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=tRchOhzXA8eOV06SD1mwROJj3KVzLCeBRorIXZab8co=; b=kxpJgdMiMsGuSocXkO24bEjY1hz8W6jUKbJO/7GRGPaydlmkFxAmSkhmK7pai0rPfE titpkPrpks5i03FsVI61CZnlE8OyKbTy8ZheXN4qav1XBUK9g1KkAzrtLymmekx4QEc9 tzzmvvbRh7dRC8CGPrdQWvaoVWvNRdhwe69BsLG4QZiRs8o/pdg5EFbp3JBM9ibdq0Q+ RdmBsDB8rxeNf6nxykoFKUN77HXSx1iiW7S/rfvITBtQnbHDPZDtInQcK/cdPsGH1ZwD jkJqpBE6+IAZMFFtvXKc5JdldejJLDG9uOGuorURiqZGp3Vox5MiS0XnJ44jvRn2y8sF Db1w== X-Forwarded-Encrypted: i=1; AJvYcCXweml+EGoyD/Bp8DbPTkHHazkoPOHWCqprFFRtvId4l3r8jOrBHJ+SzCP4NDJF+OGTClE0Onapxcq9xo8k@lists.postgresql.org X-Gm-Message-State: AOJu0Yz+MdVFa1mZCxcZEOOK9WrnoPWSLhd5VDjq9POK/TcZFVGKvtmY NhBj55qB4sy9PtJPEJ5wwoflMHjfQouRJuP7ZFmPctgZAYtgVRBPFxQR8S22lgX/Y8yOjNmNI+2 tMuEhkSjWc+pA1X131CypKmNW6pE= X-Gm-Gg: ASbGncuomC20k77mzgND4QDtxL2gQAJO9St/Kk2P5Xpoc7kvlMLSOJzt0cGdyXdPHmr bh9tUFiP8ensd6vhHCmCn6pg3VMlFDVB4Fcp5ESh2p3xERNHtMlSX65Vr9CiB4dExUHgPfVtULV akIsAoXArnqN3mtqiYqj85Q6Dzhv8O X-Google-Smtp-Source: AGHT+IHeB/uW4YzahkBZjhnXob5y9g6pwSGkyACG1vA7HhkgtJdkD6dwy6gklgVfLMBazgyftFncg5LXTB7e5+6QSQQ= X-Received: by 2002:a17:90b:4d8c:b0:2eb:140d:f6df with SMTP id 98e67ed59e1d1-2ff7ce5246cmr2939521a91.1.1741323395914; Thu, 06 Mar 2025 20:56:35 -0800 (PST) MIME-Version: 1.0 References: <5qbxud4pvnvmtuoi7weiizm5hmumxaeohx4vztfhrwlfhyz6rj@buh4435mllwo> In-Reply-To: From: Amit Kapila Date: Fri, 7 Mar 2025 10:26:23 +0530 X-Gm-Features: AQ5f1JrknYzi4GNyGX77iAIQz-vQXPfCXfOaErF_9P0SRov1sBSy1_Qm6uWPhyo Message-ID: Subject: Re: Add contrib/pg_logicalsnapinspect To: Masahiko Sawada Cc: Bertrand Drouvot , Andres Freund , Peter Smith , Peter Eisentraut , shveta malik , Bharath Rupireddy , pgsql-hackers@lists.postgresql.org 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 Fri, Mar 7, 2025 at 3:19=E2=80=AFAM Masahiko Sawada wrote: > > On Wed, Mar 5, 2025 at 4:05=E2=80=AFAM Bertrand Drouvot > wrote: > > > > Hi, > > > > On Wed, Mar 05, 2025 at 02:42:15PM +0530, Amit Kapila wrote: > > > On Wed, Mar 5, 2025 at 12:47=E2=80=AFPM Bertrand Drouvot > > > wrote: > > > > > > > > Agree, PFA a patch doing so. > > > > > > > > > > It would be better if you could add a few comments atop the > > > permutation line to explain the working of the test. > > > > yeah makes sense. Done in the attached, and bonus point I realized that= the > > test could be simplified (so, removing useless steps in passing). > > > > Thank you for the patch. > > The new simplified test case can be pretty-formatted as: > > init > begin > savepoint > truncate > checkpoint-1 > get_changes-1 > commit > checkpoint-2 > get_changes-2 > info_catchange check > info_committed check > meta check > > IIUC if another checkpoint happens between get_change-2 and the > subsequent checks, the first snapshot would be removed during the > checkpoint, resulting in a test failure. I think we could check the > snapshot files while one transaction keeps open. The more simplified > test case would be: > > init > begin > savepoint > insert(cat-change) > begin > insert(cat-change) > commit > checkpoint > get_changes > info_catchange check > info_committed check > meta check > commit > > In this test case, we would have at least one serialized snapshot that > has both cat-changes and committed txns. What do you think? > Your proposed change in the test sounds better than what we have now but I think we should also avoid autovacuum to perform analyze as that may add additional counts. For test_decoding, we keep autovacuum_naptime =3D 1d in logical.conf file, we can either use the same here or simply keep autovacuum off. --=20 With Regards, Amit Kapila.