Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pwo6O-0003zW-Dm for pgsql-admin@arkaria.postgresql.org; Wed, 10 May 2023 17:59:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pwo6N-0000uY-Ek for pgsql-admin@arkaria.postgresql.org; Wed, 10 May 2023 17:59:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pwlVG-00076L-6x for pgsql-admin@lists.postgresql.org; Wed, 10 May 2023 15:13:18 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pwlVB-001aCE-QD for pgsql-admin@lists.postgresql.org; Wed, 10 May 2023 15:13:16 +0000 Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6aaf52ff35bso4092124a34.2 for ; Wed, 10 May 2023 08:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spec-trust.com; s=google; t=1683731592; x=1686323592; h=mime-version:message-id:date:subject:to:user-agent:from:sender:from :to:cc:subject:date:message-id:reply-to; bh=8G+ziqVSDTp0sVBZMMSB6aL5TNynYvZ3IO2hfrIi+x0=; b=SqdZ+itwjp45URIq+Y4aM/pQDlphz/m3KQmmnFRKpPQtI515rXCHNVUEm4FbXk/2BT eSIJG9r0gUdKMPnT9z54MZpnKIuOcxlm/w48vqRDQXs2bOYOnoMorOo0cr2X+JpFcH9k 81ptQ+8/z2GHljxuSxSIexqRH3UslVBIniHb0W5XSxwsY+9m8ucD3epFAs3oXxdoO1F8 iQptlfxL/K9byIPGIpR+3BVNGYSPUaSRTTyd7Tqo1YeWO0BkL8PNdKH2Emf7sYKgP1Fw KRqHus3Nf3NERVdbv26bMUU1tt8ffEmzgfwRnTkO7xFNGMerBFsABWQKKAA81kIcLOS/ dEcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specprotected-com.20221208.gappssmtp.com; s=20221208; t=1683731592; x=1686323592; h=mime-version:message-id:date:subject:to:user-agent:from:sender:from :to:cc:subject:date:message-id:reply-to; bh=8G+ziqVSDTp0sVBZMMSB6aL5TNynYvZ3IO2hfrIi+x0=; b=OrY3t3kZJC4gH2E4DNp5hLowagg6fgUq93ckfW7zvMEOgXCowsNUo2+Om8aLpfl/3N yr+OjFFTef0zWDDp5SUPxLs+KERZzoeiRx5hrcV1mnk9JosEzPDX+0CcDnl/6g7vaNvH 1a3aWHm8RIj4Gr3VFjH0HCXxzz/e06ERVUfvZjcAm+BnBTwhQU5g3TSXjEC6ap+R89Aw HoK8r6/645xD0Leinh2mKHeL54+MGS7Wa3FsGKY6rT0TNvJERoQf2QpG8/SbP+/0GfGi SAIDsj4Jyl24JkfGG5BuW2x3NdkdHhg4Eim0i5SRtZEpVLjzIaoABokoqjGn7NSXKU5a KBIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683731592; x=1686323592; h=mime-version:message-id:date:subject:to:user-agent:from:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8G+ziqVSDTp0sVBZMMSB6aL5TNynYvZ3IO2hfrIi+x0=; b=DE/ApyaEYDHQPl5tYu6+aP945ICy3U0d2Mkcv4PI0Wbco6tV6s6S8DuUO5LcG830/m 0zM3CEKXzanDatCvGTmvw9yq2/PUJntcBDhXGi4bV3HN+4eVZZu98DWBfHhxSkglXKev y0RUidqAsIu1153gS6kL8Xfwec4gm7eSf4eknHDu7EB7M6gnuR/hRM2VVTX30ViMw9F1 fzL4mjE/+SLkXtrLjQD8Sj+LYpUW6DSbes8RIAb+vAALPTeE1n6f5Z5Ns411EXegrDBv Az4PFkAA4dx/u90Rd6QLear7VF4xF3RBF+A88xTAfSIpXioh2zNpmIPPjsrsNE8qgX2D Q2LQ== X-Gm-Message-State: AC+VfDyGeSzcLspaeDU6Abw9OfadH0gL8duHpbFhddL5y0YiE+Cp/dnn E8rclwlYfRBKSVGkpW2o3YQdrOW+ewL/F7D4MNR39Q== X-Google-Smtp-Source: ACHHUZ5w0PWGxqzUZlOc4WmQ0kqWMA+lE/9xeDFJqp8qgttWSep6iLnTApkzhy1qVmtTaKWtjeqXMw== X-Received: by 2002:a9d:7448:0:b0:6a5:f583:10b5 with SMTP id p8-20020a9d7448000000b006a5f58310b5mr3562094otk.28.1683731592536; Wed, 10 May 2023 08:13:12 -0700 (PDT) Received: from mp-st-nix.gmail.com ([136.62.184.40]) by smtp.gmail.com with ESMTPSA id d12-20020a05683018ec00b006ab13915cd4sm2114204otf.81.2023.05.10.08.13.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 08:13:12 -0700 (PDT) Sender: Matthew Planchard From: Matthew Planchard X-Google-Original-From: Matthew Planchard User-agent: mu4e 1.8.14; emacs 30.0.50 To: pgsql-admin@lists.postgresql.org Subject: Index recreation details with REINDEX TABLE CONCURRENTLY Date: Wed, 10 May 2023 10:04:43 -0500 Message-ID: <87ild0p6d4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, We're working on setting up some regular jobs to reindex tables where we wind up generating a lot of index bloat. We're planning on using REINDEX ... CONCURRENTLY. We'd like to reindex all of the indexes on the tables. In some of our environments, these tables are very large and under high load, and we want to minimize the resource consumption of index recreation if possible. With that in mind, my question is: does REINDEX TABLE CONCURRENTLY operate on the indexes of the table in parallel, or sequentially? If in parallel, I imagine we would see less DB resource utilization by updating one index at a time. Thanks in advance for any help you can provide. Best, Matthew