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 1uqaBE-008zLX-NX for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Aug 2025 16:36:26 +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 1uqaBD-00BV1k-R8 for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Aug 2025 16:36:24 +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 1uqaBD-00BV1c-I2 for pgsql-hackers@lists.postgresql.org; Mon, 25 Aug 2025 16:36:24 +0000 Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uqaBB-001gpE-2X for pgsql-hackers@lists.postgresql.org; Mon, 25 Aug 2025 16:36:23 +0000 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-71d6059f490so40701667b3.3 for ; Mon, 25 Aug 2025 09:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xzilla-net.20230601.gappssmtp.com; s=20230601; t=1756139781; x=1756744581; 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=uIVoPz5h4ydJW2RJ1ZgJVFH1WlsYCsxjXcbUmqKv6kM=; b=amIW+c83PFBjyeJpAwGEDwhj1cJPZGSRHJ8ATG/ksIFcF5k2wEj0lwVyg1g+jcbU+w mhx4s+frr22oGiXWqwY8izF59s9ARbnOdBvwcMwv3X9O5US7I3DQ40U3EIM/zb04L/f9 B+2c7k2zPHiuWoyC86a/ILCtfsF96evX6GCzpE9B0nXLBcLEvo65gv6N1sJHuTbwPIQ/ jVbJUdR9AGRv0C/J4e8xrd7epRWNut9R68mn1f+KMHsdEv0zlzVCwfdIYGCS8oyeRiAe qXUVqir2ZFMSirAImAjLKoH+ZyR0eiHwtf4dEmwBlWAtwKCombCLe9FMf0dDFKY5mCbb h+dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756139781; x=1756744581; 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=uIVoPz5h4ydJW2RJ1ZgJVFH1WlsYCsxjXcbUmqKv6kM=; b=k+LDJXGD2NSXu1y46wkP/hi5jSrn3duuuE4o5dRCzzJhdR+1kCAteV/RMsbC8Ef+Q9 RcIs2wD8xOT1AGb7NdwUHIL6pYJJFyaHuAoGnst4IDm99iFMhULhqFzQCCjlhni6ZEgR t76CsUGM4/xZVedDSrygpEL6zBbguzyXpTSX3n02H3ulH+1rLd1/YQ9MAynUh+7wc6F1 cUIr5W8wX0X4OwIldtc5l7uamztporDxosc8ZUybAFLGyrMIMql9BD3fDGQdVtxC5GCI H55bvS1LCZ0vRcSwiv5++5E41vt8F3yOhatiR4VFnieCeZjJPpxpiXIrxDz6AvEtIjJK nccw== X-Forwarded-Encrypted: i=1; AJvYcCXEWnf5oUwwNQVxMwXwAVYgqPwWvJcGqh/3JQQYkDbQQJw6ggoSnNSKIOzJNVqHun4TR+mubN/UPUJF32Hu@lists.postgresql.org X-Gm-Message-State: AOJu0YzWHYBws1THs7sDqxSjOrltoMWSrvE23KyEKdroYYDPSbiiaUUH XapJ0O+OoLB9zJayY5A8yMGc4TyWwPDHCcuoP9I6m450mrlG80cUpnQZIdAmhfr/o0PwtosXI8+ Jjwwqg5d+GZiVldKW1WVUIQvsCndp1EE2sNYJL4pKtw== X-Gm-Gg: ASbGncsRWlMSHyKlW8brmdQgmtYAn1juW1aq9/ybyIbt96Kwbo1ilihRCB2zGlOd2BD XCmMTnmY01UbYquYb35KemABE5gQqZXKXBLFI7b2dSVxrcZjRSYEAkEIqqWFuDcjZ2UXOtbP0/J F5nrQbzZQW7IdhqBOjosYBYN53jaRf2xKHuykfLeEsPkVpHMkW6m6VkjAvYwE05cy0wX/x2Dd6U 5wuzCI= X-Google-Smtp-Source: AGHT+IFCX8LZ/yvC8cRfb+mjMk++UlX396c6IiOiFoWNLRWqGQq8Vd7HjxbZMHCfmfawT0eOQKPlD+BiEx5RzAluzzI= X-Received: by 2002:a05:690c:6e05:b0:71f:b944:101a with SMTP id 00721157ae682-71fdc57941dmr149731987b3.53.1756139781588; Mon, 25 Aug 2025 09:36:21 -0700 (PDT) MIME-Version: 1.0 References: <202508091333.qvgvo7ikuezm@alvherre.pgsql> <40729.1755799624@localhost> <9536.1756127358@localhost> In-Reply-To: From: Robert Treat Date: Mon, 25 Aug 2025 12:36:10 -0400 X-Gm-Features: Ac12FXyidVxuxd0dL3O3B3ioIRK9gdn2ttXsZ_lIveFoX39wg4ftm-iD1MTlBTM Message-ID: Subject: Re: Adding REPACK [concurrently] To: Mihail Nikalayeu Cc: Antonin Houska , Alvaro Herrera , Fujii Masao , Pg 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 25, 2025 at 10:15=E2=80=AFAM Mihail Nikalayeu wrote: > 1) we have a whole initial table snapshot with all xmin copied from > the original table. All such xmin are committed. > 2) appling transaction sees ALL the self-alive (no xmax) tuple in it > because its xmin\xmax is committed and SnapshotSelf is happy with it > 3) each update/delete during the replay selects the last existing > tuple version, updates it xmax=3Doriginal xid and inserts a new one > keeping with xmin=3Dorignal xid > 4) --//-- > 5) --//-- > Advancing the tables min xid to at least repack XID is a pretty big feature, but the above scenario sounds like it would result in any non-modified pre-existing tuples ending up with their original xmin rather than repack XID, which seems like it could lead to weird side-effects. Maybe I am mis-thinking it though? Robert Treat https://xzilla.net