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 1tH2n3-002mWy-2V for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Nov 2024 15:20:17 +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 1tH2mz-008VRO-5F for pgsql-hackers@arkaria.postgresql.org; Fri, 29 Nov 2024 15:20:14 +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 1tH2my-008VRG-Rf for pgsql-hackers@lists.postgresql.org; Fri, 29 Nov 2024 15:20:14 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tH2ms-000AVN-PS for pgsql-hackers@lists.postgresql.org; Fri, 29 Nov 2024 15:20:13 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3825a721ae5so1260374f8f.1 for ; Fri, 29 Nov 2024 07:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732893606; x=1733498406; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Ka0e12M18wziynZMPM8B2zEavdBYC1BtRkaJ8kffSfw=; b=Cr9AG7BSr72CUxvC/fOk6dFuurwpeGwELUAkFn5XyH0ViNjFFVbcA1uDlaBG5FxwZm 2ry6yRsBnfi4n7VCBG53ER93zl3bMluwSIpQ51DIPQI4yBlwmHtTuEJygejrwDn+npZG RL2A7VcylJBkiOyt4ilBnqma7uRCXTYOYhSr6AM8vrHY73Keorm5pmSM9CDeBX/bi2ju E8iMNCbTA36H2NPJ5h1LoQzsnLDjSBA6p3bImZVVOyiBtD3b7XX1CCOnJbJ5py3hJvXE uUk+2rm5MzMmjas3AsrErjsPTvQNKKhbOV4KTpaXZ3Kb4pZ7PYTl80ikg6Yew5x5h7Fj TnIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732893606; x=1733498406; h=in-reply-to:content-transfer-encoding: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=Ka0e12M18wziynZMPM8B2zEavdBYC1BtRkaJ8kffSfw=; b=FieWy+LJbAQYMsQvCjY7Lv+y0AgrnuOpMXPQD6VqF4KJXJ8WFEuy3FT6KdHbvN33zg 7qdWOFsVj62VIES3OGqb31crNsU2tn7FyapcoEj/beVQfOExarECpMrHNXmrsk3pc65v jw844ieofr+QSfF/Ry9jPWJUrQcfBjkgwGg0JnKuuPMtBsVyJvrygW6ohygc2s4igdL+ /JW3FxayO1mdujtUZ4gMBtO2YONwCtTTrB3eryaMU4BYS+e6gmFAzOVjPcALn2RJo+fV IAzKwo4HaVQlRw4aZBqw6Qy1LqgM3B3HAI9GKjS7pr5SvcgVewYpdreInise8Gl5fVZK sWsg== X-Forwarded-Encrypted: i=1; AJvYcCXwIXrHr3gNFN6P7pKZZGIK9V27qsS1iJp8b5XQofXUMEB61dWHgcjGXAT3agG5GtAxzPXCNYjeX8FvzaCk@lists.postgresql.org X-Gm-Message-State: AOJu0Yzhijh8uL7W1bs3GeobXTxm+OYFMMg5kKS1+2yC1+c+nsjszI3t pke/nxmU8i/2QcVsVV2HH45pc3egfVJoAJa4aZziRoeJmPlHvV1U X-Gm-Gg: ASbGnctW9PGFUmacdh24wrxhimnu89lj/1dZni+lZfwtOJb/KK6S1jHz/iptLkfke7U VqOhINBu/P+/uXpGn3wxg17gylkyV/U5cdqXZEwzwKxW/y5B/uNC37RjCrSwJBx6Si3AEoEpD3Y cUTYUbL5SzN0mdXtcBPaP8XG7Xrrzxf+IS+KlJqtzO0zjSS8wO45K2lQsY/mnPzxE752kCCfoDl Cd8ObbYIIsQEUl3tUYR6jiNAD0qjC+dSFwwe9OKUe0mgXKKXidWf8YrpqnjPU5nVZTHnC4SpSi8 hXxQQMLLMBqQT+6sJFImnvMJJLRnZ//rJ8xC9dpt0nbkMt8eQLv1wTyhz1CiM+5AZITEzujPkNv v X-Google-Smtp-Source: AGHT+IH1MeTw2JKPB/P7IWPTZ6Ta8bXMQ+zjNhBMF0lpjJin4gjh248T5WxlUvqIH4CETzLlV5h8Ig== X-Received: by 2002:a5d:6daa:0:b0:382:48ba:631 with SMTP id ffacd0b85a97d-385cbd9b37emr7299665f8f.22.1732893604075; Fri, 29 Nov 2024 07:20:04 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-236-134-5.eu-west-3.compute.amazonaws.com. [15.236.134.5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385ccd3a522sm4670595f8f.52.2024.11.29.07.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2024 07:20:03 -0800 (PST) Date: Fri, 29 Nov 2024 15:20:02 +0000 From: Bertrand Drouvot To: Kirill Reshke Cc: Robert Haas , Michael Paquier , pgsql-hackers@lists.postgresql.org Subject: Re: relfilenode statistics Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Fri, Nov 29, 2024 at 11:23:12AM +0500, Kirill Reshke wrote: > On Tue, 5 Nov 2024 at 11:06, Bertrand Drouvot > wrote: > > > > > > Does it sound ok to you to move with the above principal? (I'm +1 on it). > > > > Hi! I looked through this thread. Thanks for looking at it! > Looks like we are still awaiting a patch which stores more counters > (n_dead_tup, ... etc) into relfilenode stats. Yes. > If we don’t have the relation OID when writing buffers out, can we > just store oid to buffertag mapping somewhere and use it? Do you mean add the relation OID into the BufferTag? While that could probably be done from a technical point of view (with probably non negligible amount of refactoring), I can see those cons: 1. We'd increase the BufferDesc size and approaching the 64 bytes limit (cache line size) that we don't want to exceed (see comment above BufferDesc definition) 2. Probably lot of refactoring 3. This new member would be there "only" for stats and reporting purpose as it is not needed at all for buffer related operations 4. 3. seems to indicate that's not the right place Then I think 1. and 2. are not worth it given 3. and 4. There is probably other cons too though. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com