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 1vW3Qc-00Bk0P-1W for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Dec 2025 02:07:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vW3Pb-00HWlm-0E for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Dec 2025 02:06:39 +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.96) (envelope-from ) id 1vW3Pa-00HWld-2R for pgsql-hackers@lists.postgresql.org; Thu, 18 Dec 2025 02:06:39 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vW3PZ-001Kk8-0E for pgsql-hackers@lists.postgresql.org; Thu, 18 Dec 2025 02:06:39 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-5957c929a5eso149496e87.1 for ; Wed, 17 Dec 2025 18:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766023596; x=1766628396; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XC1RWF0THJSAR61tZk/tq0nVCY2b8JRQRDu8qD9zAqQ=; b=Rcd1XYzsl7rPKRP6lkjgRdRa0iVTaMNqKh7ZYOkl4Y1SAfHTWKfGI/AkcWsiFxnTVv 4LRWtxk03AtVBMk0MAZAkIlSYCw5MZrZNib39uKh463htSkfKgGx57VqsqdUcaIsJrvC 6neD4qHpU2QTIf7wLW+AKHZexh3D1z0Js6y7ideywWWQm2hO2xlqM2mASnrBNhOLkANy QUow5VjOqCJRTm0RGre52YAPArnQHCXgCtCXdRxXBYAH4zRgISOeRyFizKnVJ++IUGAy WoLbKAjLAHF61DdAbN+ydkDc3Y74Ibz/H9/N2Ntgyv2TBKSL8QnGd31a/uzY0gd5gC0t 8LRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766023596; x=1766628396; h=content-transfer-encoding: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=XC1RWF0THJSAR61tZk/tq0nVCY2b8JRQRDu8qD9zAqQ=; b=oPdfYJZU2rXb632vDOliY2FmlqZEZjRtIM3u0biNkvjP4Yuwlxt6lmk/C3D5x8f0Dn NmqGH8WvIeI9XPHvKtU+sQza3xVn6Tvqu+iS8607RDY0MYYPM7AGO4R0QZDDCJ2XCYG5 9YIx+4cQbareHGv6Qb2iiQA2c+d5kX+Sz2lNmhJ0sH2N43rDDrv9VFPujITeIB0vANFq 1n3rDkZ1WPmTpWl70/J2IuL85dflH4fGp+Y+1q0EhQ4MICy3HWlANVzeY2ZNHf3YvkuA wHyyLEABqvaWL7YSFKu1l+qnjNcxADeTIJ8Qgc2G6fq035KiC1ZqWX9lNwBuhJPE1gEV aSZw== X-Forwarded-Encrypted: i=1; AJvYcCWLynhi0yXMJHVGdyD2++oVqByQshuwORKWLngCA4akoVaTGJ6ECWMsIqI2YBPosA6GUNXcNwafQh+7tNbx@lists.postgresql.org X-Gm-Message-State: AOJu0YyH/XI49voOBJ3C4Ov6X5Di01j3FzqjHxIGgfzbSIxf4VczWM5L Fxs5MbfV61bhPbC/CBpSIbqi70XV2I13Q5nI95mYynsLiT+LfpBSQ3PbhC5+FQFn2E3dspZe0qv 9LzWyoTpIMgx9vdS3ohylLX4HJKbnyMQ= X-Gm-Gg: AY/fxX67stEyCyVng/bd77Iuqc0dgG+cRv5dV83siZlYzZPTvQocaJ3+VUXNoEEbt/U kWECu5dlR9yZQqpFZKTETcVwXS6UWwyhXCko3lbdV1kUoNzzRcrPkjGmRveRO1BmaWBIDe0s+G5 odzqq+TRPTccDcnK+HAPBLCkLrg24yU3bUuztOntfk4V90HdnFHS5Hbt/3htQaDrOC8aXUw02Wm zW3CUuCJqtRHacMi7NnjBkG3xTeuBBe3fSXUJAkeyLUVZXAlH6HrCObd0EKRpyfkOGu/vYaa7fW GDjdgg== X-Google-Smtp-Source: AGHT+IEvrCnxT6EEpnp/kvUr4XJS31sYLIxzvCnmFv+y6bkbD/IUvQjxBewNZFAoCsLNh3LLdkHqAFCN5gUDbvTtQxU= X-Received: by 2002:a05:6512:e93:b0:594:2b58:ab83 with SMTP id 2adb3069b0e04-598faa8b984mr5834589e87.40.1766023595430; Wed, 17 Dec 2025 18:06:35 -0800 (PST) MIME-Version: 1.0 References: <202510301734.pj4uds3mqxx4@alvherre.pgsql> <116433.1764870207@localhost> <171530.1765306357@localhost> <212153.1765654761@localhost> In-Reply-To: <212153.1765654761@localhost> From: Mihail Nikalayeu Date: Thu, 18 Dec 2025 03:05:00 +0100 X-Gm-Features: AQt7F2p2STafv4IVARuGWQArjUeoo0kGuVv7AWf26WkYqXBdSTEIQCCZ_JmaSbg Message-ID: Subject: Re: Adding REPACK [concurrently] To: Antonin Houska Cc: Alvaro Herrera , Pg Hackers , Robert Treat Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, Antonin! On Sat, Dec 13, 2025 at 8:39=E2=80=AFPM Antonin Houska wro= te: > > --- > > > SpinLockAcquire(&shared->mutex); > > > valid =3D shared->sfs_valid; > > > SpinLockRelease(&shared->mutex); > > > > Better to remember last_exported here to avoid any races/misses. > > What races/misses exactly? Just as some way to reduce a number of potential scenarios/states between parallel actors. > > --- > > > bool done; > > > > bool exit_after_lsn_upto? > > Not sure. I think it should be named in some way to signal it is a request, not a rep= ort. > > Also, should we add some kind of back pressure between building > > indexes/new heap and num of WAL we have? > > But probably it is out of scope of the patch. > > Do you mean that the decoding worker should be less active if the amount = of > WAL doesn't grow too fast? In the previous version (without background) we have some kind of back-pressure during the scan part (if we have too muchWAL delayed because of us - we process it). But it is not more true with a background worker. At the same time - it never was during the index building phase... Best regards, Mikhail.