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 1u7IHr-00E8Kx-UC for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Apr 2025 18:24:04 +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 1u7IHq-00Gt0c-43 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Apr 2025 18:24:02 +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 1u7IHp-00Gt0T-QN for pgsql-hackers@lists.postgresql.org; Tue, 22 Apr 2025 18:24:02 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u7IHo-001Ok0-1a for pgsql-hackers@postgresql.org; Tue, 22 Apr 2025 18:24:01 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-39bf44be22fso3861633f8f.0 for ; Tue, 22 Apr 2025 11:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745346239; x=1745951039; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EhseEVIBs91SqFJjO9g3KpOIJQZnGSC0yN49Fz9/V5E=; b=kq97WJmfxAp65WnIbLMHqhoSCFiu8ge1IorkBymaaKP2oM5cKIE6cks/WRb6hs3lmz ITXzVYLTg0QU7McLN1ZK/l6VA1hPZrd+mibJMqX3TtiaHTR3xi7+B6ZDhfNaUbygBqYm Mb0Se7cyIg0QUaVb6YLwxr3HX/eZX4FrEhDKpJFL76xidH5/H9vGi2eYAxuS+S5f1CUj iA6U1mt2yOHwQhTFGb7Yyf1+JMUiIQEz1jHn7LmMJ4Ap+id3E/DQ+RC7M0h23LBIyYSR CaksZtYh2L143YK7BXd06lbVfsyhYqRlkMwypT5CF5MVANuux4DPz8hg6tK3II9HDgER QUqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745346239; x=1745951039; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EhseEVIBs91SqFJjO9g3KpOIJQZnGSC0yN49Fz9/V5E=; b=kATZaEJoReRVEz+iEW90N6jnQnUld67ofjZiu+r1WG5gdPXXmmXhoPqDmdrF3YehUQ rtmFiC2yGoN/1i26OF0Zabu1D7AJ7+qX1COcCnGKEM8tVXT4PX7PbR4jLExyqKEhvybQ RaHyRFQxOqgju3hN0nY/duX+SaQR5pY3A9XzjLK6e6gtsSaz7lG9WVFLNdmtqW23zcZ5 ZM6fev3ZbiAbYit3Viw+F4AoUax1qOUF4ZfUWrgxu3W6AtMczyFbGZ2jsOKB0hZMffxn GQhdpyggBpR4JZ56NXKxn33JvXEDvVR6rTBnu178avkbeXcyRcG7K9Vl2X/jtxCzGd1/ IdUg== X-Forwarded-Encrypted: i=1; AJvYcCVPA7pz6FDjCtdAFNUonatlvMfKzsPIeCvCRv/NHl5KLV4wb7nfwwOLL8MOXkWMYVdtnLNNbGdlF7DPZ0ZJ@postgresql.org X-Gm-Message-State: AOJu0YyC8jrMiJEoH8r/ol6pncHOzx9L2zGs81/HyKAvTccdXXLaTddg u64WFW2oATppE9Z6jKcAJ5c3P9dbbPR0bTM0uIvrAx6cB0jiK9GX X-Gm-Gg: ASbGncs67kE6Z0mxkFQUhUzf1O+DhO6MJn9PQu89Y2UojFRv3XckUzTFFcT0JNXT45R iA2rsmK6UJMGztfB6FYnV0XYOFcB4By+cacZip7otlL0J/eNAK9GbcA0S3/iK72I++ASfSwwI5e Qf7IVWdt4THMcaEgQNzAGCxvkpbboXJ599HH38Quko+Mrsr3QRBdW+oIr2LGlp5E8GwAl+JV5+l tB6QXfKSSKB7nIXKUUaPZNcM4iBvNwCgu9I6Jk0yxd0MZ9c88UUg+A+OHyLJ8o3//IisctijsKq K1TB/NWB1M68w9ZVzsNi3zLP51USb0dtFVvuD3L0owi7HSKOp9iFOpWyoMRj8gkOWjEKFLSVklc = X-Google-Smtp-Source: AGHT+IGpdavESFX3uSDtdTdTgV0rdr3we6RYHm/6ws4Ne05yTfvVyfZsHLDrPI3eEB+OxQrMr1ncYQ== X-Received: by 2002:a05:6000:40cd:b0:39a:d32c:fb5e with SMTP id ffacd0b85a97d-39efba3cbe4mr13477189f8f.21.1745346239203; Tue, 22 Apr 2025 11:23:59 -0700 (PDT) Received: from [192.168.0.89] (84.123.232.230.dyn.user.ono.com. [84.123.232.230]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4406d5a9df6sm188201665e9.1.2025.04.22.11.23.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Apr 2025 11:23:58 -0700 (PDT) Message-ID: <631e09ab-099c-4089-883d-4524d852dfa2@gmail.com> Date: Tue, 22 Apr 2025 20:23:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Vacuum statistics To: Alexander Korotkov , Alena Rybakina Cc: Ilia Evdokimov , Andrei Zubkov , Alena Rybakina , pgsql-hackers , jian he References: <53c47c2d-72a5-44f2-900c-9973b2af1808@tantorlabs.com> <4a902cea-54fb-41b5-b208-b84731a5f577@postgrespro.ru> <092adec6-4eae-4bd4-bd0d-473a9df1282b@tantorlabs.com> <3deae1bd-ad84-4459-a26e-04c9136b84e9@postgrespro.ru> Content-Language: en-AU From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/28/24 14:40, Alexander Korotkov wrote: > On Sun, Aug 25, 2024 at 6:59 PM Alena Rybakina >> If I missed something or misunderstood, can you explain in more detail? > > Actually, I mean why do we need a possibility to return statistics for > all tables/indexes in one function call? User anyway is supposed to > use pg_stat_vacuum_indexes/pg_stat_vacuum_tables view, which do > function calls one per relation. I suppose we can get rid of > possibility to get all the objects in one function call and just > return a tuple from the functions like other pgstatfuncs.c functions > do. I suppose it was designed this way because databases may contain thousands of tables and indexes - remember, at least, partitions. But it may be okay to use the SRF_FIRSTCALL_INIT / SRF_RETURN_NEXT API. I think by registering a prosupport routine predicting cost and rows of these calls, we may let the planner build adequate plans for queries involving those stats - people will definitely join it with something else in the database. -- regards, Andrei Lepikhov