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 1uESIZ-008Ma9-TN for pgsql-hackers@arkaria.postgresql.org; Mon, 12 May 2025 12:30:24 +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 1uESIY-00FjFf-0T for pgsql-hackers@arkaria.postgresql.org; Mon, 12 May 2025 12:30:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uESIX-00FjFV-Mn for pgsql-hackers@lists.postgresql.org; Mon, 12 May 2025 12:30:21 +0000 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uESIU-001Vbx-2L for pgsql-hackers@postgresql.org; Mon, 12 May 2025 12:30:21 +0000 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-879d2e419b9so3640949a12.2 for ; Mon, 12 May 2025 05:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747053017; x=1747657817; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=r6oqM6zXOxhDzZ4T7iGAkiUdLbRTs5U8EeDJTsbuSPc=; b=aZXnCZDGkBK5CvOrqBPuxedoALaTRBbm2lDoFwC5QWBMERLLE8hBZq9LYgsEGtRbmO +23+agghGGmYat1+SKQPWeItAg1te53jUw3yjrzgugwaV2OXNL/BIFaObxwX0F3HYeOn N3DcUerPGK24uAQtKZbXxIl/lmjMt2mE/ug3YiDaF67fF+/B0kvDYrX4goAz709VeWQK bvW1yLbOZiwO15/8nu3C5aANxJB+Cm/xa1WmbpMZxxu0e3KqcwwgQ7xeVbLvCwdoFMCT lcHh0bzy8oqdUhr41oBOPbv0ctuI9r2kj91n3i2ar9PL521e6YOz7+yhNfof6JrutdT9 JHNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747053017; x=1747657817; h=content-transfer-encoding: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=r6oqM6zXOxhDzZ4T7iGAkiUdLbRTs5U8EeDJTsbuSPc=; b=rU/E51NWDQk1OklalRQHZggoPXfmPTw4wE+aI/qiHV920sFxmBodatnF1glMOB19tK fDz7x8kFz2fpgmlXgXQLEbR98e/7vrpaZuGKP/wRPeHFTdqJCUz661GVlqi3keTzQxtb QoZDEbc08jgqjsd8F2JvQcxttY7VztUh38R8Y8MYU5bq6fzo4AHiPLMGKv7KdvzLfUd3 PnfmZCWnMNXPz7XrEOuGm0FP8h4zaTAyZ16pJk4NPKEE8TxEHKkbUnCi/tR+awDB11zx amdKLMvlG1/O4fctppKkOOsSgIyn3512OLxBN2/bjfA14JR87eWJG1In/YnCjYFQn+r1 LRgg== X-Forwarded-Encrypted: i=1; AJvYcCX9dYJ1S9j3mJFtdguGJLXjJg5upeSvJutMDwpyD47Z5CJqM24M+v1wFhcuR8Ghaz5o8KIeKB8P2QZ+1lmN@postgresql.org X-Gm-Message-State: AOJu0Yxxgox7EvkJaiXHuVzMJab/YUOPvy7LPY2aLjAk0tg8WlN1eS6b QujAashV3XyTghpxy+MRG0/8gfrbAvkcVpp8WvQsaHVXVLfqxe8PtlRuHFFIwHDPTS0GIiiI/b4 HCUsLZxtjwubXDJFhS8FLUDPcnFk= X-Gm-Gg: ASbGncvdM+l+Ihfb7ZI3SRVa/VJihcEB0iKkityA+ytIXrjo7oLoh7VvHZQ1+Hp7QGH icMskzzBKLKsAbQ+c/U7DPNB0GOET/90WC6n+CZ4CC4ERRJKLUPL9AnfPptZj3AKn4B/k/iAR1c 8Rzx3uZQVC1lBzWXi8q7z1MYcznz8vv2r2ieU= X-Google-Smtp-Source: AGHT+IEKwgcpFyzJXsMUCg6hkZ/GcVRqkyLpHyQ88IKd5l/ymPrW8J7bcO7EDpj2ZMz3G68wyM1RWOi/z0NnFFlRUEM= X-Received: by 2002:a17:90b:240d:b0:30c:5255:ffe2 with SMTP id 98e67ed59e1d1-30c525600f6mr13737147a91.2.1747053016368; Mon, 12 May 2025 05:30:16 -0700 (PDT) MIME-Version: 1.0 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> <5583261b-eede-4341-b3b1-91650fefc1cf@postgrespro.ru> <2a04ad18-5572-4633-848b-eb57209e7ac0@postgrespro.ru> In-Reply-To: <2a04ad18-5572-4633-848b-eb57209e7ac0@postgrespro.ru> From: Amit Kapila Date: Mon, 12 May 2025 18:00:03 +0530 X-Gm-Features: AX0GCFtNK7bY8IEs7HXfbiakx6s3Nfv6n6tnoPJFyCIbMmyU3bEiN9m0BkUDbPI Message-ID: Subject: Re: Vacuum statistics To: Alena Rybakina Cc: Alexander Korotkov , pgsql-hackers , Jim Nasby , Bertrand Drouvot , Ilia Evdokimov , Kirill Reshke , Andrei Zubkov , Masahiko Sawada , Melanie Plageman , jian he , a.lepikhov@postgrespro.ru, Sami Imseih , vignesh C Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, May 9, 2025 at 5:34=E2=80=AFPM Alena Rybakina wrote: > > I did a rebase and finished the part with storing statistics separately f= rom the relation statistics - now it is possible to disable the collection = of statistics for relationsh using gucs and > this allows us to solve the problem with the memory consumed. > I think this patch is trying to collect data similar to what we do for pg_stat_statements for SQL statements. So, can't we follow a similar idea such that these additional statistics will be collected once some external module like pg_stat_statements is enabled? That module should be responsible for accumulating and resetting the data, so we won't have this memory consumption issue. BTW, how will these new statistics be used to autotune a vacuum? And do we need all the statistics proposed by this patch? --=20 With Regards, Amit Kapila.