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 1tqJ5t-002kRv-3b for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 21:49:29 +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 1tqJ5r-00AMZN-R2 for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 21:49:27 +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 1tqJ5r-00AMXS-Gd for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 21:49:27 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqJ5n-001NUr-32 for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 21:49:27 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-543d8badc30so1416900e87.0 for ; Thu, 06 Mar 2025 13:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741297764; x=1741902564; 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=tIoSdg4AWVzhJplevkeNU+GfgfxlHJvO+8QAuCQzR9M=; b=JwSptr9tIeXCS1fmtTtDUKCeqU+AeXGz3SRn1oKgvEf2ei+LshYaY747twE05DL+o5 /X8k+r9oLrxf11ms0ef2Sg7RhBsHtOwJvQsnz08xadMwAWn4siLScbx0UVaPiyuJDeNl 9GGu42vz7QylvCxAM9XOcyCk5xcW1Rb7bxnbTwEiS1h4WNcub5DiAPHg8MY/fivOTTuX qH3h2E2FfFvvngHfUcfpOoEyBlMz3pbU3GffYEtR27OfMdYctCcS23qGDZ5rj5JWQAqC cegBswIRRV0IcPOHU2f5RV6y8xFmKk4Ct6zcvzbD8pXiX8swDEMjNp1VeN+kVYGsZl1q umxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741297764; x=1741902564; 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=tIoSdg4AWVzhJplevkeNU+GfgfxlHJvO+8QAuCQzR9M=; b=mSrBORvOC5DIhcXFbAbMWTDt3WZx8j8ZjflwnKyLKmTVONIL30/sm7omXjJIwdhcNd 6nL7EJdwy5CviZToGcawMRURvN4tqUNsG1+r4kdcWvYUloaU65FkUG+siYTTw4h6LIZu cZpF55SNe14cw9OdBxIGmW1cD4aGhGhZrybvDkwF7c+WfO+GSj+2NLFEu8yh78Q8dbIs 1bzRg3q7YI/6VDLHYznbLgvaiXBtkqhbqAf8DCv9RQuXC8t2Nj1q0v6BEUKcu6zYIFJa qs7hDkvDQq9w5Ag9LtEfczSWrp0a6mT37LE6+xVLuGpf0MMKWLxmGyCqwT2KqU4c04gY rY7A== X-Forwarded-Encrypted: i=1; AJvYcCXAXVSqxogxLD6QaENLaeUNQnBuO/KoHPloGSFcAa6YPDGKyeaenBQWoXH7g2G/jz+8J3h0hWmMsDK10PfK@lists.postgresql.org X-Gm-Message-State: AOJu0YxL4jGe59G5RUztTRpKFfpi1Ho65er3h8PgdPBUAUQWG3ai4Kuq u7GLHwGIDxMHLjWsPBD/G0WCJKBK6wqFBI/nmVpkAR90nOnRtZQdd9fvsa2L6KZKP6Q4FY4rQj/ KHAHYoVSaMkTpA+SOKDFqnetHnys= X-Gm-Gg: ASbGncv/jeqUkkaU0g5Q959cxPreKUpoT0di7MMSViBRDzMug6HhZWjZao6/Vp/2SX1 ZDS4JN+usHdQs8ZO1YuFcKl2GFNEdzZfLRQlT+yBEO6r31fRMtTrmaNAxEmeUzDm/vC9DAof/BG QeT+9unMDAZkG0w5y02eaDDUb1GQ== X-Google-Smtp-Source: AGHT+IEEE1PEd08JqHTYqRM3HuCZ5Qp+vN/9AfE9JISmZzDlcnP2OJuL3Ow6q9HtHOgXf/bRxVwXH2dCe4WV79LqK3E= X-Received: by 2002:a05:6512:118a:b0:545:10eb:1ab2 with SMTP id 2adb3069b0e04-54990ec19bfmr357995e87.33.1741297763261; Thu, 06 Mar 2025 13:49:23 -0800 (PST) MIME-Version: 1.0 References: <5qbxud4pvnvmtuoi7weiizm5hmumxaeohx4vztfhrwlfhyz6rj@buh4435mllwo> In-Reply-To: From: Masahiko Sawada Date: Thu, 6 Mar 2025 13:48:46 -0800 X-Gm-Features: AQ5f1JrQdVzXoWzmgOV7776oKzX4Ye5RGWPrMI3Qz1BmJLX7ZTS00VfA5P8CYc8 Message-ID: Subject: Re: Add contrib/pg_logicalsnapinspect To: Bertrand Drouvot Cc: Amit Kapila , 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 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 t= he > 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? Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com