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 1sk8ot-0084V8-A4 for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Aug 2024 21:06:11 +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 1sk8oq-00B553-Jx for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Aug 2024 21:06:09 +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 1sk8oq-00B54v-7r for pgsql-hackers@lists.postgresql.org; Fri, 30 Aug 2024 21:06:08 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sk8oo-002EaZ-8w for pgsql-hackers@postgresql.org; Fri, 30 Aug 2024 21:06:07 +0000 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-82a24deca03so57514139f.0 for ; Fri, 30 Aug 2024 14:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725051965; x=1725656765; darn=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=SvfW95gbGBk13/5vVdmGJ6sVYb1+T5Z3wixdAIJwrCQ=; b=S3XZX4p92jQGSpGcIi/zb3xRwvtrvHKgTiy0Gk+CWCQnRDe6wwS3r1lK+d375138JP Q5uRWM1Bsq0atI2jUHHIkrM9xz9TLbtlsp7/cJr+ZMBckM9C7HiN+JpvuRP3cpaYYtiF piHDZH9cMNliUv+ZWD8m4HaK3yrK1j8F4wwzcQCwvj+RdVJSCAEgsnU9ej68FVhDJ4ne zUYTVoFl3hEqhWbYsn3JX0RL98pMOVsNpsflMtbbmS12mhtubXZPT18Prd77UAB9+T9O jmfCGIa9dJzznKZvAWBPogNjW46y2+JX87Y8jMoiyQ+wtA7B4Aap3BHvOrSG7h5DpgLR DejQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725051965; x=1725656765; 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=SvfW95gbGBk13/5vVdmGJ6sVYb1+T5Z3wixdAIJwrCQ=; b=swVGDWA+I09Dw3qvrIqtaZCRwlbbf+qcoSLHlqa32J7IpUSPMcr7Ld875HuFITotXV jKPfpylndmJMc8/p11EHA35cfIuKgYXy5PuZpDrJEHxQ1+m99TX1ka7hwI8WkIwcQy0G LagnP2ZZDYIJIgFMXP/Q9iO9mnxAZrSSnIi09P7HCEwYurg6+qKi9117IYZNHFT1vvd4 XF5N+jIMj2kPIZLW0pgrVSGoS+LYPx8YhhVnIJUAifwmV1QWjKmdXOgcJIXVtoYRi8PQ xqLMyKXS82ywJt03UuN0RXSuT9EolLF0hOElzjBL42u5FMaaBI0hylf2p6rO6mKjthEw NW0A== X-Forwarded-Encrypted: i=1; AJvYcCWOA7VwzvLB4bQIlcimIEeAwJJyVD3q+f2khikfBVM1zIxRoFs251dvxGAe7tCPezlCXQaRm0uYHZdiSja0@postgresql.org X-Gm-Message-State: AOJu0YzbrUSiuICby5Tk0V9g312BMOBC7/zYXiJIkOuUUtyzydSqDMIu VgPd+u/uven1H55CRdMVgNMm+RWz17WZi5pvfhCrDtWuCtIFpd6W X-Google-Smtp-Source: AGHT+IGQ0VD71Y/zA3yiES+hUq7lX5eUZLtC2m29oUzWbNxXEJD7ahxojg4NrUa/4gFY+0WWbpLdTQ== X-Received: by 2002:a05:6602:6d17:b0:82a:2cd4:a788 with SMTP id ca18e2360f4ac-82a2cd4add5mr236745039f.15.1725051965196; Fri, 30 Aug 2024 14:06:05 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4ced2dcdce6sm895601173.6.2024.08.30.14.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 14:06:04 -0700 (PDT) Date: Fri, 30 Aug 2024 16:06:03 -0500 From: Nathan Bossart To: Robert Haas Cc: Ayush Vatsa , PostgreSQL Hackers , michael@paquier.xyz Subject: Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch 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 On Fri, Aug 30, 2024 at 04:07:30PM -0400, Robert Haas wrote: > On Thu, Aug 29, 2024 at 1:36 PM Nathan Bossart wrote: >> Thanks. Robert, do you have any concerns with this? > > I don't know if I'm exactly concerned but I don't understand what > problem we're solving, either. I thought Ayush said that the function > wouldn't produce useful results for sequences; so then why do we need > to change the code to enable it? I suppose it would be difficult to argue that it is actually useful, given it hasn't worked since v11 and apparently nobody noticed until recently. If we're content to leave it unsupported, then sure, let's just remove the "relkind == RELKIND_SEQUENCE" check in pgstat_relation(). But I also don't have a great reason to _not_ support it. It used to work (which appears to have been intentional, based on the code), it was unintentionally broken, and it'd work again with a ~1 line change. "SELECT count(*) FROM my_sequence" probably doesn't provide a lot of value, but I have no intention of proposing a patch that removes support for that. All that being said, I don't have a terribly strong opinion, but I guess I lean towards re-enabling. Another related inconsistency I just noticed in pageinspect: postgres=# select t_data from heap_page_items(get_raw_page('s', 0)); t_data -------------------------------------- \x0100000000000000000000000000000000 (1 row) postgres=# select tuple_data_split('s'::regclass, t_data, t_infomask, t_infomask2, t_bits) from heap_page_items(get_raw_page('s', 0)); ERROR: only heap AM is supported -- nathan