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 1urDoo-002XUp-IR for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Aug 2025 10:55:55 +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 1urDom-00EQBF-VD for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Aug 2025 10:55:53 +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 1urDom-00EQB7-JL for pgsql-hackers@lists.postgresql.org; Wed, 27 Aug 2025 10:55:53 +0000 Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1urDok-00283K-2U for pgsql-hackers@lists.postgresql.org; Wed, 27 Aug 2025 10:55:52 +0000 Received: by mail-vk1-xa2d.google.com with SMTP id 71dfb90a1353d-541b329a4feso1009334e0c.0 for ; Wed, 27 Aug 2025 03:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756292148; x=1756896948; 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=cTYvFT2ztt8zhpmUZHXbTwPcGWpF6HleDYoOEcVua7I=; b=Lh7VPWa9bRkm2lbQJ99O0sguqC2iv4EphrJt+dEFMgkBOyGVTJHc0f2Gml78CJzB5c zbl70zvfMNARN3fRMz5S0KrGpYZmrurKrzfz8D6tPeVurP7OqGEau8yN7L2oTbzbYLfL RWi9g8bBk1oaW0FF/5retENPiqo1F/U074sM9uzNyxg3dbK6CpCUwpEjIoB+okP91yD1 boyuA5+J5dgT/UkvDgJ71RFCb2saDLzK71JFKNI/+3IL0+tYnl3M4yzhuteeGYQOxWLK EYsMYGRyn2HCgxuY5osEW/awFp0aAexbmua6haHPaSsKvIa/8lcdlStfg/uoUwETpHPd fKUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756292148; x=1756896948; 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=cTYvFT2ztt8zhpmUZHXbTwPcGWpF6HleDYoOEcVua7I=; b=n7rbqv/lriN7y0Vf0hYBwwscnMXhA/ZAtW4tzYHxrSmjDCLn8lgrBSCL9daFEYc5oH DHzvAZ8sADInzGZX9aM2O8WJ59PwaVR3W+CJwNxn+ll2moLvn00xn6hKzvglnAyG2ZW7 1314uQ7gE01BIBl0VzBcWNOD/CIL473GIDU0uI89lG69KJvAHOKFkYk4WJj/tJXwCwFH qepKo4TL+L0HkcgvllvEue/vJh6GnTchRTPLE7E/cUuDaJDG4Qc/GS05whcYgS421864 t+IiXXT4CyFc4AZtzOADgql9vq0em3MWjbkRtyxSPZR49cfAqhtRHC/+DVM0riwLGyWX xaTg== X-Forwarded-Encrypted: i=1; AJvYcCXgoMR/oAOWXoHLexQIb/N3Fhr5Mp3QHQ8r4++5W1uI4e7WvN5oFBD5CaPwCMCN+BXIQw4z05mVc+or1A5O@lists.postgresql.org X-Gm-Message-State: AOJu0Yz6wVuXD16PKEoUqZV0QeVjOYG4ebdiaLITcRkGbuSUieJQPwyj aXzBFrEQR+A4GOZDuUIsnasZieWp1XhTA6TkcbBCcqHNz1l3VL9EQUEV5MOnBiYOUwr7yQdDE7y NlByn4nyKWGUVSSkcCmJBbB6790X9dVY= X-Gm-Gg: ASbGncs6w5O0SS9tileWy55rbYJQF36UCpHnQF3y4aGPL2N/MS3pFu8tGFSmRw5Sba8 1zQtwxxiIuPWoLt0BiSZq8BGToUy/DtII1bXIJ32KQcsafmCU7mToZ4B1d4Fjc9ZRDvD0+GgRYV cB+CPKrT5W7o3+CS8eQONXIX81yMiUDK9Fcio6XjKCEtzxJMiHwO/qYf1p05EsxsxaNwxdD/apb kMwug7Q X-Google-Smtp-Source: AGHT+IFJinF1cryoZh4W3UOGfaWH6HLTSK+s4JZYYFha9D69+i/QOU0uvv2UGT4Uk5pLAYSmx6IMWfGln9ZiTcxY8MA= X-Received: by 2002:a05:6122:a1c:b0:544:707d:1823 with SMTP id 71dfb90a1353d-544707d20a7mr345591e0c.14.1756292148484; Wed, 27 Aug 2025 03:55:48 -0700 (PDT) MIME-Version: 1.0 References: <202508091333.qvgvo7ikuezm@alvherre.pgsql> <40729.1755799624@localhost> <9536.1756127358@localhost> <21931.1756136535@localhost> <24483.1756142534@localhost> <4790.1756197960@localhost> <29527.1756215093@localhost> <6931.1756275367@localhost> <17670.1756289505@localhost> In-Reply-To: <17670.1756289505@localhost> From: Mihail Nikalayeu Date: Wed, 27 Aug 2025 12:55:12 +0200 X-Gm-Features: Ac12FXwTpVBY9_KqISVBbArqCsA958QU0fiz9LFvXoR7xAO9oMMwPNav54FRFeA 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 : > Do you mean the race related to TransactionIdIsInProgress()? Not sure I > understand, as you suggested above that you no longer need the function. The "lightweight" approaches I see so far: * XactLockTableWait before replay + SnapshotSelf(GetLatestSnapshot?) * SnapshotDirty + retry logic * SnapshotBelieveEverythingCommitted + modification of HeapTupleSatisfiesUpdate (because it called by heap_update and looks into TransactionIdIsInProgress) > It does not really worry me. The pg_squeeze extension is not MVCC-safe and I > remember there were only 1 or 2 related complaints throughout its > existence. (pg_repack isn't MVCC-safe as well, but I don't keep track of its > issues.) But pg_squeeze and pg_repack are extensions. If we are moving that mechanics into core I'd expect some improvements over pg_squeeze. MVCC-safety of REINDEX CONCURRENTLY makes it possible to run it on a regular basis as some kind of background job. It would be nice to have something like this for the heap. I agree the initial approach is too invasive, complex and performance-heavy to push it forward now. But, any of "lightweight" feels like a good candidate to be shipped with the feature itself - relatively easy and non-invasive. Best regards, Mikhail.