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 1tscHZ-003dGy-Nw for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Mar 2025 06:43:05 +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 1tscHX-005UuW-U3 for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Mar 2025 06:43:03 +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 1tscHX-005Ur2-JX for pgsql-hackers@lists.postgresql.org; Thu, 13 Mar 2025 06:43:03 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tscHV-002Yy9-1y for pgsql-hackers@postgresql.org; Thu, 13 Mar 2025 06:43:02 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43cfebc343dso2965775e9.2 for ; Wed, 12 Mar 2025 23:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741848180; x=1742452980; darn=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=uaiOpjwUZKcUwThaKFl8LM+KhCuhvn2dOXLCQfMLISE=; b=TtiyTl9xFVJ34hg7kQ8BfrnFYMewRaQonEzgRFdNHPa8cnUOSe/4eBNtg6R3DTeigp ZIsy4vLeMNT0AZpbEhVq8who8mhk/TpyEcwE27o/N2hW7BwEJ6dOa8Aqn5FvFqLngrRE JFJpgN+piY/uXHldbo5Xz13vdeyB2dFPBmaAEdw6rE+MSrOGorOdfTT9wCiIqRja3oGY TSEukEsuIKq9hUW6Gm4NwLp1R0q8puI3SN3Wo1f/SsjPni12bGEXhAjtOEQwfY7EiV2s /zKdrkhKa8BeyvlOUr2ruvT91QmWEsY9yS3lMZCubeCWy2NnwG3CjWbkO2lkYKZc5LcD S16w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741848180; x=1742452980; 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=uaiOpjwUZKcUwThaKFl8LM+KhCuhvn2dOXLCQfMLISE=; b=Dv2uNZmFh+ynoMAgoFgOdmo+4wcaqRVh5DLYllDficUIvGpFWLoMSo67a3WYz39lsV FAG3zL6FgM4H9Dmna/Vi8xrS3l51aUQkAWb2Y7ekWbA/+VlnE3rYzqES1U/WqWl8m2hv jkbLoJUbqdGN5IzTRXLdt57IauLBUA0wGZkmL5mEF8hm/mU6/JG+KY9wk6QsMZBLc0t1 JqnfnTbPNa1Zo9CtDq0lgLIdhLsqr4Z6+z2yJRD7PmfFAvgHLIC+11VWjGRGANyU5/fo gl+Fm3KGq6R3WjzwFxhhkVg8FAW2pcAFRIGwJ5tnS1UUScMqIOvg+1lEJD+X3ArqHBpO 1esw== X-Forwarded-Encrypted: i=1; AJvYcCUKI0gzDygzYOmhfZAkUHSgLx1eoHbymUkXkdcZ3jvxeOZGjpSP0kiZyFFZtJ0Eq1jZBtAOt5fInzan5eic@postgresql.org X-Gm-Message-State: AOJu0YyKYzWgemWlOHpSomT3ds59hhsFmHVW2CBPf/ioUaXpaQr+T5IY eK48wR+t5hL5skMBfxg9YQ7AeiD/ouGEsuG1dXfjZoyivcKAQVXe X-Gm-Gg: ASbGnctDYZEnj6n9y0RT3z8glPjiTLMD/ITfUGw+ibmvaHz2VYnluon1Sy3cdbgBQ3j 679KR64qFcQetRaLp4ejftf89vCEG5dJT6vzhFwR7RR6y4M+j9hSMC/JVDLHCUVUDKSkkULwNQq YYo/m3NHzf9gkhnXvoexlNOds7GavRzlAjIsssm2ab4anQIH8//N+chYyWqyA1LHJiYnDVOiNgX IBb/Ng1HtkN9rHNTSnzS6ZIAbJ5oI9INsChKi/YE5fhmb9aJfKUJA8j3wZGcIogGiA7odBLLWDK keUvQzI2Ix/jL7jgG6WuD+Py5Ua0XgV2Up6Jd7gopBMAHvivGhTsK2T7DHH3DkIBbCS7unA4slc uWXORqp01dswJHctVEWUi3r7EbuVNLbQDVJBmjSew5SGV+5/pd5CZpgZkqQR8jWRJ4OCY4RNxtu p9 X-Google-Smtp-Source: AGHT+IEEUkzUrshv1xmhp6MLprnq+ome0HXsd25Ah/602yG4fS5S2xrUausB8YlFxXUDRw4wUksXrw== X-Received: by 2002:a05:600c:1987:b0:43d:ed:ad07 with SMTP id 5b1f17b1804b1-43d01c25a05mr92065525e9.29.1741848179458; Wed, 12 Mar 2025 23:42:59 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-181-182.eu-west-3.compute.amazonaws.com. [15.237.181.182]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-395cb7ea16csm986551f8f.82.2025.03.12.23.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Mar 2025 23:42:59 -0700 (PDT) Date: Thu, 13 Mar 2025 06:42:57 +0000 From: Bertrand Drouvot To: Jim Nasby Cc: Alena Rybakina , Ilia Evdokimov , pgsql-hackers , Alexander Korotkov , Kirill Reshke , Andrei Zubkov , Masahiko Sawada , Melanie Plageman , jian he , a.lepikhov@postgrespro.ru, Sami Imseih Subject: Re: Vacuum statistics Message-ID: References: <86f76aa5-1ab5-4e2e-9b15-405051852a2a@postgrespro.ru> <1e81a0a1-a63b-48fb-905a-d6495f89ab73@postgrespro.ru> <0b4eefc7-4c38-4caa-b2ca-a4c75dd7dd12@postgrespro.ru> <333c2306-c401-4959-9f0c-a44c670a11a9@postgrespro.ru> <513f0188-b093-4cc8-98cf-4c324570d525@postgrespro.ru> <47a7b784-5218-43f2-96e3-65f9a729c5a5@tantorlabs.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 Hi, On Wed, Mar 12, 2025 at 05:15:53PM -0500, Jim Nasby wrote: > The usecase I can see here is that we don't want autovac creating so much > WAL traffic that it starts forcing other backends to have to write WAL out. > But tracking how many times autovac writes WAL buffers won't help with that Right, because the one that increments the wal_buffers_full metric could "just" be a victim (i.e the one that happens to trigger the WAL buffers disk flush, even though other backends contributed most of the buffer usage). > (though we also don't want any WAL buffers written by autovac to be counted > in the system-wide wal_buffers_full: why? Or do you mean that it would be good to have 2 kinds of metrics: one generated by "maintenance" activity and one by "regular" backends? > What would be helpful would be a way to determine if autovac was causing > enough traffic to force other backends to write WAL. Offhand I'm not sure > how practical that actually is though. a051e71e28a could help to see how much WAL has by written by the autovac workers. > BTW, there's also an argument to be made that autovac should throttle > itself if we're close to running out of available WAL buffers... hmm, yeah I think that's an interesting idea OTOH that would mean to "delegate" the WAL buffers flush to another backend. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com