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 1uqbnO-009Xx5-VU for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Aug 2025 18:19:56 +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 1uqbnO-00CbpY-7u for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Aug 2025 18:19:54 +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 1uqbnN-00CbpQ-Rw for pgsql-hackers@lists.postgresql.org; Mon, 25 Aug 2025 18:19:54 +0000 Received: from mail-ua1-x934.google.com ([2607:f8b0:4864:20::934]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uqbnM-001o7q-0G for pgsql-hackers@lists.postgresql.org; Mon, 25 Aug 2025 18:19:53 +0000 Received: by mail-ua1-x934.google.com with SMTP id a1e0cc1a2514c-8923ca8612bso770335241.3 for ; Mon, 25 Aug 2025 11:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756145990; x=1756750790; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zknmDaIymWXWA/wzr+z8z28oxMlUdEU3e4xboo+kEyQ=; b=jkU4oPUKYYq3NOBB4meuxc5n+61lnGIbdm6LIhseGiG5WXwRJuHXrYsE8d3/Vr515M L5Fd80PIfod6Sdo0MPsu5av+GlrZLo5IRmnmmhhIZ2X72QCAdm4xizQ1sFOzK+DBJoOE COhypzkdC25U2lkqPdEirmHJRRsZ8CUmr3wA1usMh+xPUXDt5ay3nxLakEvcGKSZZJ0S s1RS/3EvzEHfQNQH92ilmhtzBxAH06SUlkePH9AcDbLMHgDUnqe0G7Mo9ZOSbVydt3WG VIofgoobvgV5jR10KzHt7+XChPW4FK16RdZ1YWXrkhi1AJoWXr4UEcmMmJQkmwz376ng hzkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756145990; x=1756750790; h=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=zknmDaIymWXWA/wzr+z8z28oxMlUdEU3e4xboo+kEyQ=; b=ejVYs1CZpKEdSVVUsPlBZcS1fC87bGnEDg7YKbOuYjKf4FgG3m01L8ZxhqRohiyfy1 lL0JknxM1XcN8+pcqC5XIoqs83OTBC2DlAttAHNY95ZnVhk1tVL0UdY2K9gcpniDvrG2 4VIN7gvgBhHy6KOFigpIbRIaMKdAO8QV0whSBo2MDCWeNZVIooMQht8XwypxL7RMAuy0 VkFq5sqa1QzlpiBeJdSeXSSvnAWjpJLl3hJLFwEY9JefPHs8vJwF2245y7aeCLQRnvFU Mgsnso4h72Ak8a3ui5xhjlnhQr9ignx6MOnNh/HX95pODjhuzl4NFfT81HQvVC+WiLe3 3g/g== X-Forwarded-Encrypted: i=1; AJvYcCWstInkCSiH8boGsRhZ1x+blx85e425pUU+YCMZpeF0idLELj79iDKttG1BjWiUkibxrPJB//hucimExLBT@lists.postgresql.org X-Gm-Message-State: AOJu0YznrAyGTrPvlQJcr4VTJ0Bji8Z5L2m1coVOFTERDTIENwjOw5/0 R8WA/ZGwzP0OeIu1346ImNYCZjy74nhVt1FE4Q3NSqYJ7IvZy2v6yYmT7hH5HpP0fjxKUxxygOv ycuqnD8s0nqLfqRaKiIOm5dI9g14nr2s= X-Gm-Gg: ASbGncutylzYkIBzZixF1DjhG7QB+zVMsxdJire6wxJ/olHHGL+HfQQFAXRSipGND1r M4Fzj4ZtqYauRiqi87sjtdZkP8WY6LTNLtfyu++SSCAwT3Z6+E9JjUbl5NqNblmQuHceeBzlwod GERvEXx7P3jamjXAT/mChtRKfi1pC5NG38sWHqKV9mSLI3f2h1zP0+8o/b5SLYZoGGjSU9tjfKX 5gJeLA= X-Google-Smtp-Source: AGHT+IESyBJ5QlPGNwIZBUvOIoJOjk/F2TFFgNid47hvBH2o4WUjU/o0Mz5tjcrLbCiIPf2OUcUzTKcYtqJF6VmwOwM= X-Received: by 2002:a05:6102:2926:b0:522:3cef:80bb with SMTP id ada2fe7eead31-5223cef877emr1284065137.19.1756145989741; Mon, 25 Aug 2025 11:19:49 -0700 (PDT) MIME-Version: 1.0 References: <202508091333.qvgvo7ikuezm@alvherre.pgsql> <40729.1755799624@localhost> <9536.1756127358@localhost> <21931.1756136535@localhost> <24483.1756142534@localhost> In-Reply-To: <24483.1756142534@localhost> From: Mihail Nikalayeu Date: Mon, 25 Aug 2025 20:18:17 +0200 X-Gm-Features: Ac12FXx_tHeGGLNyM3thvtSCVEO1DxTSeYcKj-l_hvAKrpgaYvz3kFQAvnfMcxc Message-ID: Subject: Re: Adding REPACK [concurrently] To: Antonin Houska Cc: Alvaro Herrera , Fujii Masao , Robert Treat , Pg Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Antonin Houska : > I think the problem is that HeapTupleSatisfiesSelf() uses > TransactionIdIsInProgress() instead of checking the snapshot: Yes, some issues might be possible for SnapshotSelf. Possible solution is to override TransactionIdIsCurrentTransactionId to true (like you did with nParallelCurrentXids but just return true). IIUC, in that case all checks are going to behave the same way as in v5 version. > I'd prefer optimization of the logical decoding for REPACK CONCURRENTLY, and > using the MVCC snapshots. It is also possible, but it is much more complex and feels like overkill to me. We need just a way to find the latest version of row in the world of all-committed transactions without any concurrent writers - I am pretty sure it is possible to achieve in a more simple and effective way.