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 1uAtip-003cTU-B7 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 May 2025 16:58:47 +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 1uAtin-00ADmz-Bo for pgsql-hackers@arkaria.postgresql.org; Fri, 02 May 2025 16:58:46 +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 1uAtin-00ADmr-2T for pgsql-hackers@lists.postgresql.org; Fri, 02 May 2025 16:58:46 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uAtim-000jWE-0k for pgsql-hackers@lists.postgresql.org; Fri, 02 May 2025 16:58:45 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-30bef9b04adso20622111fa.1 for ; Fri, 02 May 2025 09:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746205123; x=1746809923; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=O8PesfM58EQGhWS13jyOvTmqIQlx3CLRFEA/UzLM69g=; b=Ahz7vkxuQvgxyry7YE34RhiC4hD8qZp8KI+6kApmQ9TYw5dpU9IXYKjLlEsDaL7C3Y a8Pogdz1+fr842w+jDV1Cstrnr4WCqAOXS+R4X1+K/fvdd8BEMdsXOIc119JSJsjF0Qp 5FjTL1rGvkuy9bcqjTPDhvlpKJ0j69oCx6A8weZZ+1+IdsYEw/1ldEnG9D4lfp7/JTHK /gM9SsyQBIk/2Qi76bzkhZNmhbLd9UoLc4nVwvBpYnCE/w3vOfgj0t+pL99NOL7B8eUk q8KOYVRmfrMojbjoptjdjPvHLWfVQCxEkpWvdd75VinQo/gb+pOOQT19XNHRDEaNowbZ Rrbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746205123; x=1746809923; h=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=O8PesfM58EQGhWS13jyOvTmqIQlx3CLRFEA/UzLM69g=; b=J3aCMx/WQh02go//ObthoYPbT5o8gu3JmuwvuTcYkYr5aLtJKx02nrsnawiKbAPN3H +EgBLbumN8r6eTm4I8YPL0tqGguH33kKLA3BmfS63NPXMGAjgrOPN9hhovkrz5XpQjhe KUAW645TMD815yxqu/tm/rXXPNGAAXaFNoodJ7XcuYQuf6BevbA2tkYyJJSyDtqyQJdQ Xa1D4PYhm0xQERI2d/VwX2Mhhd12BS/3tRBaMVKmS6L6si4R3sXehiMRDf7qoWgLqC8U 22kACCxC6+X19qo9ALToj0ncKa6/Hu0wINnLCXkxhLjm9+n+hfVseOneFjDWWf7VWP4X rjBA== X-Forwarded-Encrypted: i=1; AJvYcCU420Rxx8uA67nL/s36W/xtOGgP0KLSPrOzn/mTay0q1Ip8mJxld1ovYjoJCOSh3ADW8ATVqi7fwbpFxDWZ@lists.postgresql.org X-Gm-Message-State: AOJu0Ywa54Wvlva+hWOp4rir77fDz1+nWPhRQ7pPRdFiG6LxXSmZZsx5 07Z9T+OX7g2Y8lBRVflB0E0URNgEBdQfti+HLlxrMz5fZ1kDaegQmCpYcscDCtVfbwUWPQOiYPe 5mqgeSYv36A22KfmpZOO91BV+QaE= X-Gm-Gg: ASbGncuf9aGLqb/BcgURW+Q2u+i48j/+Fr0vDHuG+4zdCS/SSPqevNc80vSRUlSAE62 bahHZ5F9TGZVzK3ifBSFzv9Mu0+lQCoek1oDWstT56HzTNUWkjXUxcVuI17PKGNmYd+gnso0bhf t6bx966ZdmCfUi0aeD/Q+c X-Google-Smtp-Source: AGHT+IGPwWLnrI+TSnSL0vl61kIkCN2LertpCiAKaOjrts+xVvvdoapkApZyv8d9Rh89aOEtigcWvtHowERkOEMf+cw= X-Received: by 2002:a05:651c:1504:b0:30b:b00f:9507 with SMTP id 38308e7fff4ca-320c47e5ad0mr9008021fa.24.1746205122791; Fri, 02 May 2025 09:58:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sami Imseih Date: Fri, 2 May 2025 11:58:30 -0500 X-Gm-Features: ATxdqUFiE7bP_t1a9iNiC2pwZZ50hQ6215kYe2KUnh_S0F8ZqIpwu1AfyFod0bg Message-ID: Subject: Re: POC: Parallel processing of indexes in autovacuum To: Masahiko Sawada Cc: Maxim Orlov , Postgres hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks for raising this idea! I am generally -1 on the idea of autovacuum performing parallel index vacuum, because I always felt that the parallel option should be employed in a targeted manner for a specific table. if you have a bunch of large tables, some more important than others, a/c may end up using parallel resources on the least important tables and you will have to adjust a/v settings per table, etc to get the right table to be parallel index vacuumed by a/v. Also, with the TIDStore improvements for index cleanup, and the practical elimination of multi-pass index vacuums, I see this being even less convincing as something to add to a/v. Now, If I am going to allocate extra workers to run vacuum in parallel, why not just provide more autovacuum workers instead so I can get more tables vacuumed within a span of time? > Once we have parallel heap vacuum, as discussed in thread[1], it would > also likely be beneficial to incorporate it into autovacuum during > aggressive vacuum or failsafe mode. IIRC, index cleanup is disabled by failsafe. -- Sami Imseih Amazon Web Services (AWS)