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 1tiJ5S-00EFUq-DC for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2025 20:11:58 +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 1tiJ5Q-00Dhok-CU for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Feb 2025 20:11:57 +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.94.2) (envelope-from ) id 1tiJ5Q-00Dhoc-2x for pgsql-hackers@lists.postgresql.org; Wed, 12 Feb 2025 20:11:56 +0000 Received: from smtp92.iad3b.emailsrvr.com ([146.20.161.92]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tiJ5O-000UX3-1H for pgsql-hackers@postgresql.org; Wed, 12 Feb 2025 20:11:56 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp12.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 82742C03A6 for ; Wed, 12 Feb 2025 15:11:52 -0500 (EST) From: Christophe Pettus Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Cost-based delay for (other) maintenance operations Message-Id: Date: Wed, 12 Feb 2025 12:11:21 -0800 To: pgsql-hackers@postgresql.org X-Mailer: Apple Mail (2.3776.700.51) X-Classification-ID: be320005-8246-489e-b32c-09c243c5c371-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk We've run into multiple situations recently where clients were = effectively unable to run CREATE INDEX or REINDEX (CONCURRENTLY or = otherwise) due to the load that they imposed on the system, mostly in = I/O. I'd like to propose a cost-based delay system for maintenance = operations such as these, paralleling the system for (auto)VACUUM. = Before I pull together a code proposal, I wanted to preflight the idea = to make sure it has not been considered and rejected already, or find = out if anyone is working on it already.=