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 1sr1rC-00Eyv4-KY for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2024 21:05:02 +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 1sr1r9-00FlYJ-ST for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2024 21:04:59 +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 1sr1r9-00FlY6-GM for pgsql-hackers@lists.postgresql.org; Wed, 18 Sep 2024 21:04:59 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sr1r6-001rkJ-VP for pgsql-hackers@lists.postgresql.org; Wed, 18 Sep 2024 21:04:58 +0000 Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-82ab349320fso9598839f.1 for ; Wed, 18 Sep 2024 14:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726693496; x=1727298296; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=693iWLAJ7RO4hVgYTLG1OXI11KoevGy3RKsPAjRKSfA=; b=nUJX5lyKvAnaG2r1Rk35Fl192MSl/65LE8HjUKqA6P0lLBAlY3CsAHlYANGI2npii/ 54ZusB5eIn9hGRrh2PcEAyiCvVy4FaRRFU7ZVS3JB5iFdCxf3KIlAcTS+tU/lZeab3+h z/Drar6/qm6Z9b1iuyQ2/L6ZnNFEx7WPf/UUPpZ1xwtBzBx298mdowW8h1qpw7rUgBIc fnHvBlO0aOMKzIP796s/4BBupMAgL01MN6vjARC6r63ejLx92S0RtsSdX8PlLism5skt rJrFatmdT8QkzCpE8vnSFsMjgq3do+4p7C0iCci4giPLoIOTepU58QRxG4oUtbIbPSud nOoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726693496; x=1727298296; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=693iWLAJ7RO4hVgYTLG1OXI11KoevGy3RKsPAjRKSfA=; b=Ah5bkazzEieIzr82h82Rv44Rj2LCyOhnymwaChMey1zz0V7vOcGohz0GMY5fXRwj/f Lda6pi/GHsctYc5R2SIPWLF3tgNKee/H9QumENrgp5BwU41ZgB1Xkteeu/YIgia+HA/x cf5xufaoRV0XgJattERRmmsNz0qZMsVbekf9olSefTJKwhDukvfGzLNnNYKIFubm74u4 rPrrJvOJefGEV7rOiDl/T2b0sBzysmBekfVQo+Kx0ZEFKNtm+vJzKi9cWBGW10AmFSPO jSqmK6f1mOZoB1WBOnDdAsg0HH15CG2NOJmRgJaHspg4aMELphnue8ecm2QfOy5gOtby +sqw== X-Forwarded-Encrypted: i=1; AJvYcCURSDtcMEcbxgQCxdCrmMaj/fOwOj6aKaMoKZzDmQa+8iqPrTp0fvyeYAT+xPeaPCA1DPK5K2/vXSfC3P7V@lists.postgresql.org X-Gm-Message-State: AOJu0Yy6FcpPCBtmStTpFXOk05njd4NUqRrL1DjCXRssYqNOhG3FNwPM T8+J2DNgcc4UmYuHj7Tz9I2Vuf6LnHacJ4ywQ+KLdIx032VVAFEq X-Google-Smtp-Source: AGHT+IHAjvPq3sM91IOf4iYf7E2aUtqBOo1Sku+LJZIFimy5jeKRvBsfgAKpgJUzJdUXmSpSt4ecQA== X-Received: by 2002:a05:6602:6192:b0:82a:3552:6b26 with SMTP id ca18e2360f4ac-82d1f968010mr2084441439f.15.1726693495982; Wed, 18 Sep 2024 14:04:55 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-82d4928ac38sm283710639f.17.2024.09.18.14.04.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 14:04:55 -0700 (PDT) Date: Wed, 18 Sep 2024 16:04:53 -0500 From: Nathan Bossart To: Bertrand Drouvot Cc: "Imseih (AWS), Sami" , Masahiko Sawada , "pgsql-hackers@lists.postgresql.org" , Robert Haas Subject: Re: Track the amount of time waiting due to cost_delay Message-ID: References: <42B4800A-D8D0-4734-930A-4D94D0EA90C7@amazon.com> <8D4DC535-1C51-44A9-ABDD-420F975AE8A9@amazon.com> 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 Thu, Sep 05, 2024 at 04:59:54AM +0000, Bertrand Drouvot wrote: > Please find attached v6, a mandatory rebase due to catversion bump conflict. > I'm removing the catversion bump from the patch as it generates too frequent > conflicts (just mention it needs to be done in the commit message). v6 looks generally reasonable to me. I think the nap_time_since_last_report variable needs to be marked static, though. One thing that occurs to me is that this information may not be particularly useful when parallel workers are used. Without parallelism, it's easy enough to figure out the percentage of time that your VACUUM is spending asleep, but when there are parallel workers, it may be hard to deduce much of anything from the value. I'm not sure that this is a deal-breaker for the patch, though, if for no other reason than it'll most likely be used for autovacuum, which doesn't use parallel vacuum yet. If there are no other concerns, I'll plan on committing this one soon after a bit of editorialization. -- nathan