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.94.2) (envelope-from ) id 1tqrdz-00BJPF-Q8 for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Mar 2025 10:42:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tqrdx-00F1rM-2O for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Mar 2025 10:42:57 +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.94.2) (envelope-from ) id 1tqrdw-00F1ql-N2 for pgsql-hackers@lists.postgresql.org; Sat, 08 Mar 2025 10:42:56 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqrdu-001f19-0R for pgsql-hackers@lists.postgresql.org; Sat, 08 Mar 2025 10:42:55 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5e61d91a087so283899a12.0 for ; Sat, 08 Mar 2025 02:42:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741430573; x=1742035373; 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=BhzyrWivpFDGOz0rCQxJEFrjRUvZlbUMvqNMhdi22Yg=; b=TtEYmhnlLxlUFWkPbWv0EXhkXfytae/CYjppXvyQ4WY/G4oErAK70wL8jyHmXAgLL5 otiHZcWuMQ5EtbBXtcsnfyULdXnXeo/mKKwfilU1QzetCbg3wp1eNVJc52lWKJNpfTkc HbgBvW1IzVNqBiblD7dW+GJzSzJEiU06jNiV5cfq9qk92cdOI0PBFwxVXuHhiUJNbTqq d9o2tuwHxfL/WBZxTFR6v45/DSGioNVY4GKLCqBhjJSLLd2gt7RWjbfEdGO9a4tlMjWa v4l/6t+BJ/8XJU3yMBVUXOL60mVqbG0+0vzLnb51742rlweozXJlAMGfdorpPcqMbn0u Xvvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741430573; x=1742035373; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BhzyrWivpFDGOz0rCQxJEFrjRUvZlbUMvqNMhdi22Yg=; b=HfPfTnInM7hGqbzCFBDjt+KOQkj2ENBISupt/EkE7aT9XEtV8ypmN7I1S10cvpnRH0 rwsoTDyUo8WgyGN1TE8jm68Xvg7GizlPZPtoVzBjRc21kq6wQLIhm4T93/TltU43DRDm EVAKk8C9n0yNyIeKhatcqLxFOjQJ+d555xw8duExaUWNbDrvUa3cKgAXk4DhjrjU2dim WnnO+dDw1xGB+F4t+81fajpn8OIr1OY6ETGgth84xzJxhhDQPXe/2jAzrmCDCJmwRQv4 8M0udeO09KdgkqNxuxOt6EL/X6UPSdwWl/XqyQCQNisHrWGGAWecRSgYotha2q52DzGM klFQ== X-Forwarded-Encrypted: i=1; AJvYcCUbcWMBc/apkJGNLEIX8QacOJOvgpSFrM8fnEp5OiDKoCIpw6RVL9mnhMDBkN6fNZJB+jytA4XNMC1J8Gki@lists.postgresql.org X-Gm-Message-State: AOJu0YxqfI0s81h5WVl6Bwf2uKsw9HNRScdbAH/7EqgVGKFzioCtIS0o qGlK/BQUuJSwiy2HeWE6lmaJZ4V2dNNS/QsRwVcWLx3NEnWSJdTQtrt15GkUIkuNq7MxIcxzKd9 dV65O6js29n7IYddTwPa1qRxr24I= X-Gm-Gg: ASbGnctbasHYY7exMI2876sdjwViBLUTqvw5VrpWIATFfeFBblsSfsONoE7XW0x3L7b 5sBYJNWeZk9Y/Sj+PmWBZGM4nig0a0Y7nKMdaQLsMCMpMWePApMX1AovKlJ32LobVzxddfGzA7b o44B+3QSkk6sfkJP6BuRqqBvUt1w== X-Google-Smtp-Source: AGHT+IGM7RE4ZTtyd60X7zKbg+3oARJ/UbtuSVgzn6vGbLFD3rcdQEpLWNrBlN1wOYLGIzwTShUl5Dni6/8NdtV43B0= X-Received: by 2002:a05:6402:42d4:b0:5e0:8c55:50d with SMTP id 4fb4d7f45d1cf-5e5e22cbc79mr18993803a12.14.1741430572449; Sat, 08 Mar 2025 02:42:52 -0800 (PST) MIME-Version: 1.0 References: <202503071820.j25zn3lo4hvn@alvherre.pgsql> <202503080956.vjxmabdkatan@alvherre.pgsql> In-Reply-To: <202503080956.vjxmabdkatan@alvherre.pgsql> From: Alexander Korotkov Date: Sat, 8 Mar 2025 12:42:41 +0200 X-Gm-Features: AQ5f1Jo2uBLb9preYjUdPzPORqxW2nOj7smz8NegLQOY5va6te3TzrwixQ1oG_U Message-ID: Subject: Re: pgsql: reindexdb: Add the index-level REINDEX with multiple jobs To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: Alexander Korotkov , pgsql-hackers@lists.postgresql.org, Maxim Orlov , Svetlana Derevyanko 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 On Sat, Mar 8, 2025 at 11:57=E2=80=AFAM =C3=81lvaro Herrera wrote: > > On 2025-Mar-07, =C3=81lvaro Herrera wrote: > > > I tested this, because of a refactoring suggestion [1] and I find that > > it's rather completely broken. > > I think we need significantly more complex scheduling code if we want > this to actually work, possibly even having to hack the ParallelSlot > API some, so that we can inspect which tables have a running reindex and > know not to schedule the next one on it. What we're doing now makes no > sense. > > We should strike this out from the list of features of 17 and revert > this commit. > > If we want this feature in 19, we need another go through the drawing > board. (There's clearly not enough time to do it for 18.) Yes, I also think we need to revert this from 17. One thing to care about: it might be already used in some user scripts. Should we replace pg_fatal() with some notice and then run in a single job? So, user scripts wouldn't error out. ------ Regards, Alexander Korotkov Supabase