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 1vQNbu-006Wa0-1r for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Dec 2025 10:27:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vQNbt-007Djj-1W for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Dec 2025 10:27:53 +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 1vQNbt-007DjZ-0V for pgsql-hackers@lists.postgresql.org; Tue, 02 Dec 2025 10:27:53 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vQNbq-002jEw-2C for pgsql-hackers@postgresql.org; Tue, 02 Dec 2025 10:27:52 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-37a875e3418so39830001fa.1 for ; Tue, 02 Dec 2025 02:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764671270; x=1765276070; darn=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=cKUyJw9Not94zBup7r7WCQ/L+HWsWbXT9m2B9ZLKCWs=; b=BXTQ3llm05h2BtAaOe6sBbo82Tt+SdW1byOq+WcSodjycWituYNLfKodwhn3Qs7p53 eLi995VaIalRZyFC+LAFtIVAYgTiyHHp+XUMiunZVgUoJnrqvrOxtSiIYG4hlALM8y+h V0bUnw7ge5vG07tfRlEF7NBtaIpU752XpHiBvQDlqtcusvZxNHqFUqiNVZgddxKoIINM 9HQAE6FyOcgHWOaCfblRthnTRGOd5mdonAPtx0wgSa6j9O5V52DH/yq+2Maqlob65Cqg 8nhVOy/Ah9qxHcG+QNe0KICMMYrJzrF57MlgtY1Y8R7WDHUzt1/VcBRlVdeY9qLl6eKA t8YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764671270; x=1765276070; 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=cKUyJw9Not94zBup7r7WCQ/L+HWsWbXT9m2B9ZLKCWs=; b=rBU3WnwTxNuxVkZDJUGM1jb2XzYUcSJFN58btzk0ONAbY7hxUZgQuRzA+gR1RQbJX3 4tdai4Ihp21TYsX/yq6gAGTuWRuBSx3BF5GfAsQ8HOeToGk+swN5vV/ljGmbN20f9M8R 0RrCkglwySHH0F8lZqPEUZbiJqeaE80WykyEiFyO7MdzzNP/KloTHUbhN10FS88jeoYt NDgeua6MyxJNiEM7kAqVaFc7G+ua/9k4DSVG24pcfAHqNcbuCQXhGliIDMZ6ppoF6fsk 68Mu0DbOzTG/kNn6gHIlZoSXUISa0+ag7Juq83Y6ENASDqu9WSkFdQKFhyjGdxP0Tuhk akeA== X-Forwarded-Encrypted: i=1; AJvYcCWH5VcG3IK0osjBXuU3GuaiyecKUOsE/KqkqJ2WjhR16Q8Gghjw3IWy+5udEQBUYlMzuD/YI454vAMoVWEj@postgresql.org X-Gm-Message-State: AOJu0Yyh1ya/X7QPV/7SxOzp9VMyd85wS7rfAa3VzPDzBgR+VXAimRq1 bcwaWB7UzfBjLwqRgsK2B20PWuPcEcwE79NpWC57rW0+FbzSIoOvLFH5Cu2y2ue/vsgWbQvKYao 7YbBaqMibWiiYcgAF02exN8k3wdszCUg= X-Gm-Gg: ASbGncuy5C0hKjtnWtPN9ZHdCcbYjzDE+421M4zmeAO52hJszDnOxS79jYEMGEaEHD8 bBbChBWEm/mD7lVQASzO/pDTaA7keM0EnqHN5kJU1nPoILemGMLYUdxbK/cV624tbDehjs95/Rk anYjaNIMBhHh3K/a/ObDkSg+DlADLjW5TsUVetFcuq+ZaEsWwVhbTLa2iuiE7k+azUJdU860Cqs wdVki5uKTnwMTX9HseF2VsQbQ3mUCP/5hwgSwP6CnWyr8cQTce90zqknlQS4HPLdD2oYniyzMow JtzasmtQqxEn6Tr9SkrCaTgFxHW6Pg== X-Google-Smtp-Source: AGHT+IEu/LcNflZBRdnSX4rTyCwF4Uzdn5Bk6Bk7lknz9jq+t9OLExaSeJ+DWQCef/1a3BDgW1hgTOG9VS7jUZF/8Bo= X-Received: by 2002:a05:651c:3251:b0:37a:382a:abc5 with SMTP id 38308e7fff4ca-37d0775f1e7mr83611831fa.3.1764671269378; Tue, 02 Dec 2025 02:27:49 -0800 (PST) MIME-Version: 1.0 References: <202505181556.3n6oiowvntyr@alvherre.pgsql> <8010.1764584989@localhost> <5778.1764660480@localhost> In-Reply-To: <5778.1764660480@localhost> From: Mihail Nikalayeu Date: Tue, 2 Dec 2025 11:27:00 +0100 X-Gm-Features: AWmQ_bkZG0fPQud_CuoCgr_1q6MU1U1BgE3AIC_a_fbgn8kqaDJ3rGbv9rmHnq8 Message-ID: Subject: Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements To: Antonin Houska Cc: Hannu Krosing , Matthias van de Meent , Sergey Sargsyan , alvherre@kurilemu.de, Andres Freund , Michael Paquier , PostgreSQL Hackers , Andrey Borodin , Melanie Plageman 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 Tue, Dec 2, 2025 at 8:28=E2=80=AFAM Antonin Houska wrot= e: > I suppose you don't want to use logical decoding for CIC, do you? How can= then > it be "the same" like in REPACK (CONCURRENTLY)? Or do you propose to rewo= rk > REPACK (CONCURRENTLY) from scratch so that it does not use logical decodi= ng > either? My logic here chain is next: * looks like we may reuse snapshot reset technique for REPACK, using LR+some tricks * if it worked, why should we use reset technique + STIR (not LR too) in CI= C? * mostly because it is not possible to active LR for some of tables * but there is (your) patch what aims to add the ability to activate LR for any table * if it worked - it feels natural to replace STIR by LR to keep things looking the same and working the same way While STIR may be more efficient and simple for CIC - it is still an additional entity in the PG domain, so LR may be a better solution from a system design perspective. But it is only thought so far, because I have not yet proved reset snapshot is possible for REPACK (need to do some POC at least). What do you think? Also, I think I'll extract reset-snapshot for CIC in a separate CF entry, since it still may be used with or without either STIR or LR. Best regards, MIkhail,