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 1tsUN5-002XY6-Ez for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 22:16:16 +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 1tsUN2-00EuAd-PO for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 22:16:12 +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 1tsUN2-00EuAU-B1 for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 22:16:12 +0000 Received: from mail-ua1-x932.google.com ([2607:f8b0:4864:20::932]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tsUMw-002VAU-2k for pgsql-hackers@postgresql.org; Wed, 12 Mar 2025 22:16:11 +0000 Received: by mail-ua1-x932.google.com with SMTP id a1e0cc1a2514c-8671d8b46ccso13930241.0 for ; Wed, 12 Mar 2025 15:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upgrade.com; s=google; t=1741817766; x=1742422566; darn=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=HAXhl5mKOx7LKrRFmrEV72MUgYO6i03AgHJMzoEyUbo=; b=JmSDExaAgInGoH6LPcacyv8A5hwmAATshoGwhG6NYGgvybwi/DTxyEno3KPV4H74Pw /uiYRL9MNKgp9i2Bp/+EvQVlsW2Bxmd1HT8V+dnJIztjQTGs5cp8eADKkgnjPj4FvmB2 /D/ayxr2Rx5jEv7bAocAg5YOXeV9xo68k1yYa7oyotFPefiCi5Z67y3sGpCvRkuHKyan VtEzd0Fm/zPenRwSODE+sVP7tvJcAsVw2jsclkTqSjv18ubESnwnF5bdJQWcFJUNqoXF gEwbX0cy3GMzv19JRc96QezJFe23ny0b/Rytm6UWXtW65ydky6mJpZ5lnJbyHuvV9B0W O2Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741817766; x=1742422566; 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=HAXhl5mKOx7LKrRFmrEV72MUgYO6i03AgHJMzoEyUbo=; b=OFcTIH6HIijoOHCNs/PlerevYYgTmQ2TzUTn4a2D3Tg/GjJyn5qTsUrHrBtnzvi/hD Se0EoRqF/xx3oloWCs9odno3S8Z6Pk6Y6QZrPNpZE8REHthJUQ8kvlNKeD7jeE0crvh5 R9zsjxvDUxjNdGSV4IwiTWBk8dHip7y08WOelktI2rfXxb7tY87V1aTFYYvA+HZ5KMhz YHI+sYUp2MBw2DkmhEVJi2F78NwvvKoU4Tr9A8TwZfN0vNuxoWLHW+Z4IHdO1Qd6BO5P vQh0oetzeOEE+25vlXf3Nc8tdzxECbWVI8/ZA9hmcDEGPoUjE7+HKDnglOSkFuFLXiT+ 4tJg== X-Forwarded-Encrypted: i=1; AJvYcCWP2TcHk6qZ1r30dO4KktiJUS165QRuHV7FZnx7AuTMkOJ/9v5Of8kTEX7++sSz2827e5GjJqKm9ZKThI0F@postgresql.org X-Gm-Message-State: AOJu0YxzrJuQL1Fg0nfhU82Pe5dOxrY+T60Zn6s9shfphDjANtyy4C+1 0NcoWa4FHgdiiI/WrpGtPekhdm3+f9i3aYtuSyuqKJAl/90nTQfcVo3Fr6WvlzJVkiX+KU/pazF awLEOfBjJkyzfra2Xv+48S3nWFV96mxL6I0mlXw== X-Gm-Gg: ASbGncvdTJdWBO7dCEGOOopCyQ6+sdNGtU1lJZutC/BkP2/sXxqYIU3rtasttdA6ECV 5obOkHrakk40cPDD4nNQvZI7m2thtlmKHiBwQDgLRLFnvvulB9LAdJknTxY7EVOW+qlLAHyHJZ5 fO22R6Yn4NmpIXldKkkoNnkeMAfm3vVLcJBJ+u X-Google-Smtp-Source: AGHT+IEvGZoXaiKMLLexclbnfGFuJAd50kFO4HmJCWXA5ZVcnB1DRs042psrQBWKuNkgZ131z0SMG9kiCeSPwJTwiys= X-Received: by 2002:a05:6122:54d:b0:520:59ee:8194 with SMTP id 71dfb90a1353d-524197cc795mr2855337e0c.1.1741817765753; Wed, 12 Mar 2025 15:16:05 -0700 (PDT) MIME-Version: 1.0 References: <5AA8FFD5-6DE2-4A31-8E00-AE98F738F5D1@upgrade.com> <85b963fe-5977-43aa-9241-75b862abcc69@postgrespro.ru> <9C7A167C-DCDE-4A17-9ABE-6276723FEC50@upgrade.com> <2d493cf9-9ba7-4cc1-a3f2-67afd7c163ee@postgrespro.ru> <30d54302-9e9c-4e04-819e-a13b679cdcc8@postgrespro.ru> <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> In-Reply-To: From: Jim Nasby Date: Wed, 12 Mar 2025 17:15:53 -0500 X-Gm-Features: AQ5f1JqcoOuge7rHOPBQQubA-raYCkEHBIYorbiRG3pyKM7MDi5HNTqPFqcgUT4 Message-ID: Subject: Re: Vacuum statistics To: Alena Rybakina Cc: Ilia Evdokimov , pgsql-hackers , Alexander Korotkov , Kirill Reshke , Andrei Zubkov , Masahiko Sawada , Melanie Plageman , jian he , a.lepikhov@postgrespro.ru, Sami Imseih Content-Type: multipart/alternative; boundary="00000000000031183806302c8dba" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000031183806302c8dba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 12, 2025 at 2:41=E2=80=AFPM Alena Rybakina wrote: > Hi! > > On 10.03.2025 12:13, Ilia Evdokimov wrote: > > Hi, > > > > After commit eaf5027 we should add information about wal_buffers_full. > > > > Any thoughts? > > > > -- > > Best regards, > > Ilia Evdokimov, > > Tantor Labs LLC. > > > I think I can add it. To be honest, I haven't gotten to know this > statistic yet, haven't had time to get to know this commit yet. How will > this statistic help us analyze the work of the vacuum for relations? > 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 (though we also don't want any WAL buffers written by autovac to be counted in the system-wide wal_buffers_full: autovac is a BG process and it's fine if it's spending time writing WAL out). I think the same is true of a manual vacuum as well. 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. 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... --00000000000031183806302c8dba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Mar 12, 2025 at 2:41=E2=80=AFPM A= lena Rybakina <a.rybakina@p= ostgrespro.ru> wrote:
Hi!

On 10.03.2025 12:13, Ilia Evdokimov wrote:
> Hi,
>
> After commit eaf5027 we should add information about wal_buffers_full.=
>
> Any thoughts?
>
> --
> Best regards,
> Ilia Evdokimov,
> Tantor Labs LLC.
>
I think I can add it. To be honest, I haven't gotten to know this
statistic yet, haven't had time to get to know this commit yet. How wil= l
this statistic help us analyze the work of the vacuum for relations?

The usecase=C2=A0I can see here is that we do= n't want autovac creating so much WAL traffic that it starts forcing ot= her backends to have to write WAL out. But tracking how many times autovac = writes WAL buffers won't help with that (though we also don't want = any WAL buffers written by autovac to be counted in the system-wide wal_buf= fers_full: autovac is a BG process and it's fine if it's spending t= ime writing WAL out). I think the same is true of a manual vacuum as well.<= /div>

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.
=
BTW, there's also an argument to be made that autovac sh= ould throttle itself if we're close to running out of available WAL buf= fers...=C2=A0
--00000000000031183806302c8dba--