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 1u0aFt-003lXr-J7 for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 06:10:17 +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 1u0aFs-00EKBY-Bc for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 06:10:16 +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 1u0aFs-00EKBI-1z for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 06:10:16 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u0aFp-003Inc-1h for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 06:10:15 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-549946c5346so1971290e87.2 for ; Thu, 03 Apr 2025 23:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743747012; x=1744351812; 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=1DPv2bXiaqgpodJ4Zq14NcewZfknbX4BJhukzvYKGSI=; b=nC+/1W6ptlLDAtLU9B8ggSSC3bub5G7rCI8Qbg4bJZrXRiPL8Z59zyixhE4FjWMK2o +m01edPoekgbHW5PFNCfoo6RnUz61TCJMXw2HLVKY+2He5cvUy3KirtsySmB/nRAKeeS EnW5mMnE71Mb5AzmIdLPrLxdjF1m8kyqYDxm88I+5eoNXPlUZFkArobGsSU5mGwEE66r dZT8mFgOSq7yU7B5djeGzv7KU4DVIhA36f8mPqStqX7VozxYrkIqOcNW4VTj4JlEJPd4 apeSPkNOhSwc0aCQZzPH7lwipaZGzeXY/9WNUzKaEDnWbGbq3NxfreyxAWL+OhqMrKe8 Cspg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743747012; x=1744351812; 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=1DPv2bXiaqgpodJ4Zq14NcewZfknbX4BJhukzvYKGSI=; b=adOKapfbqtfT4/SMaNisVdUtB29/P7OY61cjZs8UIN9Lkgk63yt0UG92SGbfmzobjp EVdG22ZXHhZVM0BDpSarkxRYXYBb6JATPILCxZT8t7c6u6GABOq8Go14Z5+W2XvDXEQt ceIfyyYzbN+0BF01hG7FGEevovR1OuXY9KCx3vQxJE6AhxLnz5EsaPFAApRLgreuRsrz FAoL+A/mp40HVtuePkW5cLx1EfsXgZGBKBplkLqhUn3BUVqM5CtaszJajhVsnzEckV2/ X18/I0hMncVoE6zfzPnYzOZqmL3Qco9f98vdZif/1h0eoSIbFSjbe/8R/tSiMSE2bzEF pguA== X-Forwarded-Encrypted: i=1; AJvYcCXTPe4kJQ89rYkFhhWLG/4pu0lqokOEVUnQTiiYYHcipmXtlshpVfVjazZzCaKgOYC99XDGrWLmHAP87dbV@lists.postgresql.org X-Gm-Message-State: AOJu0Yx2XvB8G5Wz7k6EYCigRMl53o092fqYO7cHJocK083QQLQ9loBN //ECS4N9ipeYkYfaTQ4MWbwy+RBJU3znDXWfT88LgKhen5pw2iHRuqApYb6ONlP7FYW+hitVpoX zRthGf4Umm4cicEBepw6NmoUOaLY= X-Gm-Gg: ASbGncvlKtI5An+PIH33bVj6OZmMzJLFFzMD5/MgN84q2KUwcFdMNjLFT+eiUEBInxE 6/dMF4pKHY+G9AnnoX7htyMSvjEn1daT9ei7cB60zQAhoKJhLUuQwu6Gc8medXvRpQag0JnVINQ 09aMfK9S5J83pRtu6BAF7MuGI51cg= X-Google-Smtp-Source: AGHT+IEVpUWQET8+Vc7R5MPMD6SwnCT8R1WzDk9S1xP4dDqfw05kZwzTwNRlDxFydln1wNmizJdXByZEq1512JwWH+A= X-Received: by 2002:a05:6512:4021:b0:544:11cf:10c1 with SMTP id 2adb3069b0e04-54c2278a753mr438502e87.30.1743747012118; Thu, 03 Apr 2025 23:10:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiko Sawada Date: Thu, 3 Apr 2025 23:09:35 -0700 X-Gm-Features: ATxdqUFIpzyBU0YHgmewesNl3C5wICTmOXntHYY-XXu4R6TSp0XZsFLjmZ9yBHQ Message-ID: Subject: Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state To: cca5507 Cc: Bertrand Drouvot , Michael Paquier , pgsql-hackers 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 Mon, Aug 12, 2024 at 9:25=E2=80=AFPM cca5507 wrote: > > Hi, > > I refactor the code and fix the git apply warning according to [1]. > > Here are the new version patches. > I've investigated the reported issue and reviewed the patch. IIUC to fix this issue, what we need to do is to track catalog-change transactions even in BUILDING_SNAPSHOT phase so that we can decode transactions correctly that started in FULL_SNAPSHOT. My question is; in order to track just catalog-change transactions, whether it's sufficient to check if XLOG_XACT_COMMIT[_PREPARED] has the XACT_XINFO_HAS_INVALS flag. If yes, we probably should change only xact_decode() to check the commit records even in BUILDING_SNAPSHOT. Otherwise, we would need to change mostly all paths where we mark the transaction as catalog-change as the patch does. Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com