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 1vrvH6-00D6B2-3B for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Feb 2026 09:52:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vrvH5-000chn-2j for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Feb 2026 09:52:15 +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 1vrvD0-0002pg-1Q for pgsql-hackers@lists.postgresql.org; Mon, 16 Feb 2026 09:48:02 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vrtK1-00000000qoH-3xWp for pgsql-hackers@lists.postgresql.org; Mon, 16 Feb 2026 07:47:11 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-48068127f00so30527215e9.3 for ; Sun, 15 Feb 2026 23:47:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1771228029; x=1771832829; darn=lists.postgresql.org; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=flKvog1PpxDwk720ZX7nlS48nM+WGn9QopMlDJ+Y/jQ=; b=V0vxGwwnk0hm6lnkfcQcQuu3m8VsWYVyNk2uuVx0zMPSrnq7Nko0YBNsQA2mW7ltFn 3sSW3zvP5/Szfbyq+9am/qbzDOf3CuQmgxUH2qO4LOHc1YfgzQmCjBzduCHmWKsVcxPK 1pqdUmpAcCprDQgrwi0FDFi3xI2C3WuH/BjX2M2a3vQTqHM2ErD1GK86IuWirC+CH+D3 LzPdRUsaR7lUuRLLW6iHIm6Wby79dtbfHzGdBFhbqfGJJyBiFYSHqgDCN6XQM4GFy8Cv 87uc1nAj8getz5Kls8vDL1QYEFX1r7QIpGlrwNbfiBzV+eWgwt7U6b319SqwREnj0Z+/ xuGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771228029; x=1771832829; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=flKvog1PpxDwk720ZX7nlS48nM+WGn9QopMlDJ+Y/jQ=; b=COWga3TcKC7o34xXI5IAyauf00ratY/R6R5/dpmwYZYd/y6zTD5qXanZ9HZ7xYkfkH /g7YS4kxLSor+hK1B5+wnwihEJA4M2OBzLBFQwRNgXGJbdlZo4f1Ev+XWuDDdTYBOzjt HxtEIq0bLXo3CmdTKFtA5Wi6VbzgYPTO6sog/iLznhaIs20YBtYMOke0wYPxE1jDbrEI mBjvAWDm6eQW6/osIkJmBEVEWLFVEuaFjgxZZ+1O3JDcy2kTtx09GK6sPtNq+NImzSpT ku1oygFuo/5SLbKswbvlt/pGLEYwjXvEo5MBcVLgAnu9fUsbGj7PZCAVZlEgW/XV9vZI c6/g== X-Forwarded-Encrypted: i=1; AJvYcCWn15ptnr8vDs6EaSbU4Bdlt7EzvcPXx9YFtuNVjY0N7SsYj59dkIAkBJfdj2ppykB4b1wwzpJkDgVXaTmP@lists.postgresql.org X-Gm-Message-State: AOJu0YwFe66jcQ1IEIu0pU90/8tOuauSKuXrKa/IbFI08CMztIKS+JUT 2O7XtQbe7gvxxz4BjetoB5OVHAG4zheTKtbEal8rvikd/zQc9vAb9uIiWxry94QaW9ofbDIAeFg eBt8E X-Gm-Gg: AZuq6aL5ud++5fB0T0cjg3ajBNEFnQkdLeQGnzJKMf8VDTj5LMr7KOq14nNE07X8z9u M9c1yBOHOM+Gis4Oo+ihik6hgRVeVHK22ISQZr3+b31xwIE9MBhyFNow3/s9idlC8KwZO/ItC+O XBi3Pp4mS97Ur9tR6OGhMy5NaNZqDyJAvdONx7Ym2o9btxqnPA8B5urhJsfe0ii/+6EvqnsQXYo GYaFB4xzhq3BjRZ998Xre/lIYBoUVNwh+J/O/fcRP2MIHXwvF27+LWg1kJ5gODR1vliw6SW+6N5 wEQDclYPH+j/gxKAecif8Y+DoOoi4kVSohZXaohs6wj57jMS804YEV2tfAJQuf5Snz8gA0zYl30 t/+0otLG0aVyLEdXTexi/0n7u9tmi+7TYZ9Kbk/YvKvogwRvxK41Ohi3+tN7fDV3SX1YlowDeS6 lE5SgIop0fBsRm1WwFLTOhWBlpteJcls75c6co X-Received: by 2002:a05:600c:314f:b0:483:498f:7953 with SMTP id 5b1f17b1804b1-48373a6de6dmr145876645e9.28.1771228029103; Sun, 15 Feb 2026 23:47:09 -0800 (PST) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4834d82a4afsm774252235e9.11.2026.02.15.23.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Feb 2026 23:47:08 -0800 (PST) From: Antonin Houska To: Mihail Nikalayeu cc: Alvaro Herrera , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: References: <88003.1769511456@localhost> <202602061452.uzu7cksrgzf4@alvherre.pgsql> Comments: In-reply-to Mihail Nikalayeu message dated "Sun, 15 Feb 2026 17:03:00 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14758.1771228028.1@localhost> Date: Mon, 16 Feb 2026 08:47:08 +0100 Message-ID: <14759.1771228028@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mihail Nikalayeu wrote: > Some feedback for v33. Thanks again for your review! > > else if (pg_strcasecmp(cmd, "REPACK") == 0) > > cmdtype = PROGRESS_COMMAND_REPACK; > src/backend/utils/adt/pgstatfuncs.c:290 > > I think we need to add "CLUSTER" here too to avoid regression. What kind of regression? There is no pg_stat_get_progress_info('CLUSTER') call in system_views.sql. > ----------- > > > ConditionVariablePrepareToSleep(&shared->cv); > > for (;;) > > { > > bool initialized; > > > > SpinLockAcquire(&shared->mutex); > > initialized = shared->initialized; > > SpinLockRelease(&shared->mutex); > src/backend/commands/cluster.c:3663 > > I think we should check GetBackgroundWorkerPid for worker status, to > not wait forever in case of some issue with the worker. ConditionVariableSleep() calls CHECK_FOR_INTERRUPTS(). That should process error messages from the worker. > ----------- > > > /* Error queue. */ > > shm_mq *error_mq; > src/backend/commands/cluster.c:210. > > Not used anywhere. ok > ----------- > > > finish_heap_swap(old_table_oid, new_table_oid, > > is_system_catalog, > > false, /* swap_toast_by_content */ > > false, true, false, > > frozenXid, cutoffMulti, > > relpersistence); > src/backend/commands/cluster.c > > I think we should add comments for other boolean parameters. Perhaps, it wouldn't hurt. > ----------- > > > elog(ERROR, "Incomplete insert info."); > > elog(ERROR, "Incomplete update info."); > src/backend/replication/pgoutput_repack/pgoutput_repack.c:118,132 > > Should be non-capitalized? ok > ----------- > > > # Copyright (c) 2022-2024, PostgreSQL Global Development Group > src/backend/replication/pgoutput_repack/meson.build > > 2022-2026 ok > ----------- > > > int newxcnt = 0; > src/backend/replication/logical/snapbuild.c:53 > > uint32 is better here. This was already discussed: https://www.postgresql.org/message-id/137668.1768235610%40localhost -- Antonin Houska Web: https://www.cybertec-postgresql.com