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 1nT99t-000165-TH for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Mar 2022 21:20:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nT99r-0005hV-IP for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Mar 2022 21:20:15 +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 1nT99q-0005h9-VH for pgsql-hackers@lists.postgresql.org; Sat, 12 Mar 2022 21:20:15 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nT99k-0001hQ-GU for pgsql-hackers@postgresql.org; Sat, 12 Mar 2022 21:20:13 +0000 Received: by mail-pg1-x52d.google.com with SMTP id o23so10385180pgk.13 for ; Sat, 12 Mar 2022 13:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1zzkrKmfY9eyRIl3LP2g6E2O9deMY9ZGnOejXNen6vw=; b=FDxg2+a9vhCq5HAYWC4WCCnVW5FwxQyJDkfHbnJMYzbK+FyMSIa+Bj60069JS+elfy IKF501ydzcpmd2GtiJvzxW7r0BHVmp4S8d0xWqA1VYGv3GTk/hACmeOhoX5NfGt5q/Zq QL+tzZtO/v8CV0CaiKo7voCUx+DlaH6o4cEA3fqOeSptrZKYO8G1Bgj2SXu6KOrw5Sus EN5ld2jSHwkzS2yKobxflAPLnWTFmIwgBvtDKbNPZGGp9EBaarVJs59GXOcHcV2zzOsz uBxsQfJ6atLtcgrZ88MCUOXJZXNwlvfcUHLw0nAUPJ00lTOL/wHatEAd9HYeW1g5Eqoi yZjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1zzkrKmfY9eyRIl3LP2g6E2O9deMY9ZGnOejXNen6vw=; b=LWT9qnIYnyFJ3bUlUGpBKE6TChBa8jWSfWWCnQAy4wHW5h2+CPiqs7sRvh4fv2dLB6 /z0CQSVHR5ud1tA85kMZQIY9g505JMC1ffiMn6hoj0gHfvDtedJsqc44gHHjkehBS8Dy c0GOHaLiQM31hjAPZAkaMz424k3Bzjn4EYDYeXWVuuqk3n0pJXMDBt1BvFNNB9KmSe2b PSFO+n4pMkb48VIlUupH/oTo2Z3AQmeWcKIH1STtg3aHQtLi9TGxSfCE2jj0h3UdL01N g2LeiuVz9K1IH0jF/HcTxhfhJfBR3GXyjXa7yh8jITyxdWjM4j6SIP055egJw8UpBN+v iBbw== X-Gm-Message-State: AOAM5333oM710O2ic/vfPyeVxzvQStbMOwd0SP7/NKCDpYMnTmex7xPU IztHtE2DAGE4Avp2Ll7zK0s= X-Google-Smtp-Source: ABdhPJyZSSGOI5Hv8LKdb12rl9jJH74BLUomTHkTlzNUCm0gFG4vMhBjK9Ks3wVI0Y9Wkp6W0i83FQ== X-Received: by 2002:a65:4108:0:b0:36b:ffa6:9c86 with SMTP id w8-20020a654108000000b0036bffa69c86mr13489764pgp.203.1647120006867; Sat, 12 Mar 2022 13:20:06 -0800 (PST) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id x23-20020a63fe57000000b0036490068f12sm11622454pgj.90.2022.03.12.13.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Mar 2022 13:20:06 -0800 (PST) Date: Sat, 12 Mar 2022 13:20:04 -0800 From: Nathan Bossart To: "Imseih (AWS), Sami" Cc: Masahiko Sawada , Peter Geoghegan , "Bossart, Nathan" , Justin Pryzby , "pgsql-hackers@postgresql.org" Subject: Re: Add index scan progress to pg_stat_progress_vacuum Message-ID: <20220312212004.GA848429@nathanxps13> References: <20220225195253.GA663211@nathanxps13> <99A5CBE8-EC10-42AA-ABB4-4C812EEFD294@amazon.com> <20220310005237.GA307769@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Mar 12, 2022 at 07:00:06AM +0000, Imseih (AWS), Sami wrote: >> nitpick: Can we remove the extra spaces in the parentheses? > > fixed > >> What does it mean if there isn't an entry in the map? Is this actually >> expected, or should we ERROR instead? > > I cleaned up the code here and added comments. > >> I think the number of entries should be shared between >> VacuumWorkerProgressShmemInit() and VacuumWorkerProgressShmemSize(). >> Otherwise, we might update one and not the other. > > Fixed > >> I think we should elaborate a bit more in this comment. It's difficult to >> follow what this is doing without referencing the comment above >> set_vacuum_worker_progress(). > > More comments added > > I also simplified the 0002 patch as well. These patches look pretty good to me. Barring additional feedback, I intend to mark this as ready-for-committer early next week. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com