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.96) (envelope-from ) id 1vgQmd-00CUFI-36 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 17:05:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgQmc-000h7k-0u for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 17:05:18 +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.96) (envelope-from ) id 1vgQmb-000h7c-2N for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 17:05:18 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgQmZ-000b48-1Z for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 17:05:17 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-59b6f04cae6so1196400e87.2 for ; Thu, 15 Jan 2026 09:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768496715; x=1769101515; 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=DFzJOAXqx1wuXbPxWgxyC85xSdEvHtCB7tExAYFy10c=; b=FKHY4u1xvTFoNsjhSvZnsGOhHB3vFET5rp7G/1LzqoNVs2xdFhrwR860wImzGXRKM9 uxqi33q1JqEbAbb8cwpTJHJNYCqatKsFafDcsJrTXRlbWGLZwnfukqFhe3IXGyT4vzGM CBdP+SYbNnXt6gdMPWgLnmEkB+Om7L9t83ciNrA1EkhlPD5rgRkLJ4stnfvrdE3J3Pl3 5JDbOqtFFdgqOq7WGokfw4ZLA49SLHRfzURFwo2tpB9cc+rJods1DDrVICKTWuYpW+EQ Pep1fyhWzIWEhP+nfVfvy5BeUWszpdpZcqeCsxtxaxmZZwyl8Bua7PHBwszxJF6YKdBG xakw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768496715; x=1769101515; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DFzJOAXqx1wuXbPxWgxyC85xSdEvHtCB7tExAYFy10c=; b=sYuZ2NwH1BO2FJchBChQ4Gv5ALvpBKfpYGKGPDfAL0Q6Ld+6u8CluS+IUIfroB+z77 oRiJJph6S5FuOno1BAhfR5KiymSkX6YyW3nO6tNW+z21utRFQ1kmAGwVlQnbtE5luDYg JWUPgYReN/kE5PolYEde/IzX1HNkQY8na0IQWmUlhd4JEtV3fEa8V0AlPabqVYADCQnt hFpic9FEgnhnwYGKkSkAZI/1bfPwwMkzLV0iqV8Qr0QB0DBseH92rb0nxHoXM1lkjVE9 Mhz7LRkM8eWGaPOH/6TDgcqVHEYOrAACjGm5mqQDTmVif0hnmb3FZqLmi6qFw9auWCb3 NoMw== X-Forwarded-Encrypted: i=1; AJvYcCXZk6PcLwOSWqs9Xvr21xP971+fmer7ON+/usR7rQS+c2ABnl380U5uPd2apZn2W/zUgqbOhUxtm6xNOsYZ@lists.postgresql.org X-Gm-Message-State: AOJu0Yw+cb5cJdVzEAvFjtadLbM6qplsm2uJscEhS0GlcQYBFXSwIxES z32EZi3SEn1AiKl7hd4kX8AJsAJJ0o6HhGWchsdZV6+0Eo74/oedyeXWFbVV5eT4ivlbYE4Zfsw fdCea8u6d4Xp37OWD2T78is+q+trZX+o= X-Gm-Gg: AY/fxX5kjgJ8DhfAsrOoEChXClUhEkkg2Z4Crov84aQuIZjWmYSod1iEHBBwuukgYDO 5vwRU62cOxPXjBPeiwfdxhPkqG5PLM6S08FhNhqTvMlDE7ZtXtpNnUByyJRHvQ5ygMiWeGMgyZ2 JjUeNxMG+T43btxMTHWlfYZL7Vh1ccsu4IZXidMVb2V0yEApgefj+If03FmgtHqfri8TQQWRrIX hVkMJowZn0YWkO8hGoNziz1P4vArJwLnrAow94RQCHY4y95HfPJbJ32t0N4aWkpn257DANTrUBt hCk0cS0xf3WbvvbAOfEUpBJM9nXa6ArW3Dkm9vnT+u7mHMJ7MY9q/SSj X-Received: by 2002:a05:6512:110f:b0:59b:7c23:c637 with SMTP id 2adb3069b0e04-59baeedb316mr74789e87.22.1768496714166; Thu, 15 Jan 2026 09:05:14 -0800 (PST) MIME-Version: 1.0 References: <202512151349.vlq3mpfniyk3@alvherre.pgsql> <11247.1767609087@localhost> <11558.1767609632@localhost> <141054.1767891540@localhost> <137668.1768235610@localhost> <35686.1768495019@localhost> In-Reply-To: <35686.1768495019@localhost> From: Mihail Nikalayeu Date: Thu, 15 Jan 2026 20:05:02 +0300 X-Gm-Features: AZwV_QjG1ys-dkE4mm-AVGHDsPRX5vF-zAM1s8z8CJJ8nq6LPM629kDIznMT4FU Message-ID: Subject: Re: Adding REPACK [concurrently] To: Antonin Houska Cc: Alvaro Herrera , Pg Hackers , Robert Treat Content-Type: multipart/alternative; boundary="0000000000006f35630648703aac" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006f35630648703aac Content-Type: text/plain; charset="UTF-8" Hello! Antonin Houska : As the test runs pgbench with --client=30 and the default value of max_worker_processes is 8, I'm not sure this is a leak. I've increased this parameter I couldn't see the error anymore. Hm, as far as I remember only single repack may be executed in test (because of locking on test itself and also REPACK). At least still feel suspicious. I agree that this is due to the missing MVCC safety feature. I commented that check in the script for now. I don't think so. In case of non-MVCC safety we should see 0 or correct sum. But script failed with 490588... But should see 500500 (if I correctly calculated sum of numbers from 1 to 1000)... Besides that, I saw some deadlocks. I think this was due to the fact that multiple rows are updated per transaction, and that the keys are random, so it can happen that two transactions try to update the same rows in different order. I increased the number of rows in the test table to 10000 and don't see the deadlocks anymore. I think better to use min/max in updates to be sure (update lower id first). This is tricky. I could reproduce the problem on my FreeBSD box a few times, never on Linux (no idea if the OS makes the difference since HW is also quite different, but CI also seemed to fail more often on FreeBSD.) You may try to play with no_hot parameter in test - maybe it will provide some clue. Best regards, Mikhail. --0000000000006f35630648703aac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!

Antonin Houska <ah@cybertec.at>:
As the test runs pgbench with --client=3D30 and the de= fault value of
max_worker_processes is 8, I'm not sure this is a lea= k. I've increased this
parameter I couldn't see the error anymor= e.

Hm, as far as I remember only single repack may be executed in test (beca= use of locking on test itself and also REPACK).

=
At least still feel suspicious.


I agree that this is due to the missing MVCC safety feature. I comme= nted that
check in the script for now.

I don't think so. In case of non-MVCC sa= fety we should see 0 or correct sum. But script failed with 490588...
=

But should see 500500 (if I c= orrectly calculated sum of numbers from 1 to 1000)...

Besides that, I saw som= e deadlocks. I think this was due to the fact that
multiple rows are upd= ated per transaction, and that the keys are random, so it
can happen tha= t two transactions try to update the same rows in different
order. I inc= reased the number of rows in the test table to 10000 and don't see
t= he deadlocks anymore.

I think better to use min/max in updates to be sure (u= pdate lower id first).

<= div style=3D"min-width:150px" class=3D"elided-text">
This is tricky. I could reproduce the problem on my Fr= eeBSD box a few times,
never on Linux (no idea if the OS makes the diffe= rence since HW is also quite
different, but CI also seemed to fail more = often on FreeBSD.)

=
You may try to play with no_hot parameter in test - maybe= it will provide some clue.

Best regards,
Mikhail.
--0000000000006f35630648703aac--