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 1wBvM9-001VEh-0R for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 14:00:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wBvM6-002Rad-0p for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 14:00:07 +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 1wBvM5-002RaM-2k for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 14:00:06 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wBvM4-00000000e6f-2uTf for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 14:00:05 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-488a88aeec9so47424635e9.2 for ; Sun, 12 Apr 2026 07:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776002403; x=1776607203; darn=lists.postgresql.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=qmFelOeB90a8FTn0tydskYpB5u+WJopwxCNYRU2U/Ec=; b=AoZH2OjaoIFzFiP7cg0j6swI9zmdK/5m3nSAfVPdHMEKidrwIxrXkGgGCi3lDuKK0n U7hYORe8EWAqnE6HFjd4JRaTpcCsDyIHeVyK0Mava6xIarAC3rkq/7bKqsBdcpEzC+86 aCWIZeE7GMvfYU9MbQkZwyN/LAWgsK8kLUmR7rPgI03491DCkIoYWqrAQssC08H0q4qH FETNsLMO3x9lu/UA8Ebt3b8+njy8/lnINjQRq4mXJcEGEomNff+Yi1A1qIq6R8TYINhu VERLdMWye5+GQaDvoERzz069UJ548VS5zCuH1TgEdZHiRwWrw3UhhLuSx2+XzhE26Ny6 daUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776002403; x=1776607203; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qmFelOeB90a8FTn0tydskYpB5u+WJopwxCNYRU2U/Ec=; b=i2KDMq++Ff/l5/insXWaJWRYjN/9yqnuQ3I3ApW4KxCyIdOs8/CfzmSQ+gkErOAlqG Q7GiZfDktgn1gBwWoal3QNkfG1PW8KpZUsUPhpfgHK9qiE4NJkjc8U1PtWqmr733EM0E yXFyqJ7vkGIQ69vj/3TuMltBrZpRkBHLp5WpLbN2LuJt7Puy7P6flni7s3RBDS7a/VVW 0opEsvxnwkCbkdMZBqDciB7i+fD6t3hNwdN+V5IvplsLAGlHOGr69a+sIGTADquOX/in HLQsACPOeRBbiyCmWWS+OlQrNTQi2Bb78zWa71i1Tdf9BPJaAZ5vWoQif7QXD5eP3JfW 3lxQ== X-Forwarded-Encrypted: i=1; AJvYcCVro6I+UV1OwKog+dlVXg5eoxCGq3oqv751xdkHIcv9YgvJrPDYMmLVkH3mHa9S4/gCTAnutMhAHp2rsfBp@lists.postgresql.org X-Gm-Message-State: AOJu0YzTrNCLcrQWTZxFbQhQec1dGgUdiK4v8MEzlkwG9XI/8JUz8Lk0 qJp1vaSMmYOyAKL0/7Y65B5EDwZdYyyELzKAbklaIEWV5x4BClp71zHM X-Gm-Gg: AeBDietGfOa7B0t/t7jTAauEb7dr/zOoSi6egUCNTDFM1fXk8h62PxzkYArEkeAmq1Y jrjUuMCU3h6rPZohY6kb5C0yruPUohTIGk0SG6Ar077q+nsEMiyZfAE1NqwUUGRHNBeG6GsUELO Jv70RIAYjyLPleL3rgxrTuX2ujpgEh73oZdWlBakX5Ky1j0AxDuyVvxFJuPL9rvvrfNy8aVU6/N OBd9JGYR4xQZjt9TwEVD7dJJOcLDNMpeSrjyHIDUT/3QDJTbhcs1M6UU95F/kAmdjnjCBbwpGTq /HxGydxYWF7qNZHyhvY/H08JQoj3lt7e5k7hd1RlVpCPNQbqTq/byilWOtrnTwOLLEwM39nWWq0 iyoz4MenWesNAz4+ApEjqi4XofpjNJCX7OEZqD5U9CruDNUGtXMPGfyYDSb1IQk5xXiZPQGSeas yJRbLJoiUGZDZLqJD8v+J/hLCj X-Received: by 2002:a05:600c:5308:b0:488:8d44:bf98 with SMTP id 5b1f17b1804b1-488d67f088amr138047455e9.7.1776002403322; Sun, 12 Apr 2026 07:00:03 -0700 (PDT) Received: from [192.168.0.50] ([89.149.68.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d684406bsm67707065e9.24.2026.04.12.07.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Apr 2026 07:00:01 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------5UYxIpHDXjUGmTf0X1Rc4yTC" Message-ID: <18181295-8375-4789-ad32-269d78d6001e@gmail.com> Date: Sun, 12 Apr 2026 17:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Adding REPACK [concurrently] To: Antonin Houska , Alvaro Herrera Cc: Amit Kapila , "Hayato Kuroda (Fujitsu)" , Srinath Reddy Sadipiralla , Mihail Nikalayeu , Matthias van de Meent , Pg Hackers , Robert Treat References: <202604072027.gazfa2zt2l2j@alvherre.pgsql> <121156.1775818667@localhost> Content-Language: en-US From: Alexander Lakhin In-Reply-To: <121156.1775818667@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------5UYxIpHDXjUGmTf0X1Rc4yTC Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello Antonin and Alvaro, 10.04.2026 13:57, Antonin Houska wrote: > Attached is a fix that works for me. > > Nevertheless, REPACK (CONCURRENTLY) in your test goes ahead only due to commit > 0d3dba38c7, which will probably be reverted [1]. Then REPACK will wait for the > transaction in the other database (db1) to complete before it can actually > start. Thank you for the fix! I've stumbled upon one more issue with this feature: CREATE TABLE t (i int PRIMARY KEY); REPACK (CONCURRENTLY) t; fails for me with sanitizers enabled and min_dynamic_shared_memory = '1GB' in postgresql.conf as below: 2026-04-12 13:23:02.000 UTC [2733633] LOG:  statement: REPACK (CONCURRENTLY) t; repack.c:3373:15: runtime error: load of value 240, which is not a valid value for type '_Bool'     #0 0x6441f7eba454 in start_repack_decoding_worker .../src/backend/commands/repack.c:3373     #1 0x6441f7ebdaad in rebuild_relation .../src/backend/commands/repack.c:1010     #2 0x6441f7ebe9a2 in cluster_rel .../src/backend/commands/repack.c:656     #3 0x6441f7ebefea in process_single_relation .../src/backend/commands/repack.c:2359     #4 0x6441f7ebf870 in ExecRepack .../src/backend/commands/repack.c:296     #5 0x6441f886f20e in standard_ProcessUtility .../src/backend/tcop/utility.c:867 ... 2026-04-12 13:23:03.620 UTC [2733620] LOG:  client backend (PID 2733633) was terminated by signal 6: Aborted 2026-04-12 13:23:03.620 UTC [2733620] DETAIL:  Failed process was running: REPACK (CONCURRENTLY) t; Could you please have a look? Best regards, Alexander --------------5UYxIpHDXjUGmTf0X1Rc4yTC Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello Antonin and Alvaro,

10.04.2026 13:57, Antonin Houska wrote:
Attached is a fix that works for me.

Nevertheless, REPACK (CONCURRENTLY) in your test goes ahead only due to commit
0d3dba38c7, which will probably be reverted [1]. Then REPACK will wait for the
transaction in the other database (db1) to complete before it can actually
start.

Thank you for the fix!

I've stumbled upon one more issue with this feature:
CREATE TABLE t (i int PRIMARY KEY);
REPACK (CONCURRENTLY) t;

fails for me with sanitizers enabled and
min_dynamic_shared_memory = '1GB'
in postgresql.conf as below:
2026-04-12 13:23:02.000 UTC [2733633] LOG:  statement: REPACK (CONCURRENTLY) t;
repack.c:3373:15: runtime error: load of value 240, which is not a valid value for type '_Bool'
    #0 0x6441f7eba454 in start_repack_decoding_worker .../src/backend/commands/repack.c:3373
    #1 0x6441f7ebdaad in rebuild_relation .../src/backend/commands/repack.c:1010
    #2 0x6441f7ebe9a2 in cluster_rel .../src/backend/commands/repack.c:656
    #3 0x6441f7ebefea in process_single_relation .../src/backend/commands/repack.c:2359
    #4 0x6441f7ebf870 in ExecRepack .../src/backend/commands/repack.c:296
    #5 0x6441f886f20e in standard_ProcessUtility .../src/backend/tcop/utility.c:867
...

2026-04-12 13:23:03.620 UTC [2733620] LOG:  client backend (PID 2733633) was terminated by signal 6: Aborted
2026-04-12 13:23:03.620 UTC [2733620] DETAIL:  Failed process was running: REPACK (CONCURRENTLY) t;

Could you please have a look?

Best regards,
Alexander
--------------5UYxIpHDXjUGmTf0X1Rc4yTC--