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 1sjj4c-003MRw-Fn for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Aug 2024 17:36:42 +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 1sjj4a-005B0V-Iw for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Aug 2024 17:36:41 +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 1sjj4a-005B0G-8z for pgsql-hackers@lists.postgresql.org; Thu, 29 Aug 2024 17:36:40 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sjj4Y-00234m-DD for pgsql-hackers@postgresql.org; Thu, 29 Aug 2024 17:36:39 +0000 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-81fe38c7255so61481239f.1 for ; Thu, 29 Aug 2024 10:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724952998; x=1725557798; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dP/MEJ8w/khxT+x/iz2JidkHPsORsi+dnSlBw0UT+mc=; b=DhclYBKlne83UMG8whgqj+KpD2dqd7GeZqBiNvwk2UlT5YzZ+++K/lVET5/GvwJ41D 3jxQrDVlVVRlM8oSeKOAtyb7btuhmNJoaupdLiVloDQcQxwSjAb/N04630y/D8Vq2EiL hBXmfu+A2Mqw1kkMs0Pq37++pVZtH5NpxkSxE5fqJ0Pnl8k1bYor9kuZPYlI5zDc0ser VvDYrVsEz+dMjALRNkxXXKX3k9hWVQhfHWggbaLxJpG6qGwoXyclQ5xhuiI+zOkt3ptH zbYzU1O4Kw3o7XjRQTcYnkvtLLxVZeIqRSbKQ8+ty6RJDzrJTevyKyPJN5lrSr3Lafpo 9+FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724952998; x=1725557798; h=in-reply-to: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=dP/MEJ8w/khxT+x/iz2JidkHPsORsi+dnSlBw0UT+mc=; b=hmREQMOoWhz2dtlMV1HfVZa3eCUaGvK4G5WxcD+eyMSNReCjLGNGmNgGqeTEo7bmRm Ld7XakSZ3qJ2Au6wGgTLBT2827pXgRIJpU6PmS7B2Q9kgCv513yMcMdtKPIQELKTo98P ypEotjGuEIepuQWJ2M9jyNZ1VnnxlVoo2MfMUC3WjwqaI7AWllc3ixXhspBhW5TJUNt7 1bDSdz8O/pHNUGaUNI1qM5jqTUlhTLHTzGuBksN6Z1LuF1lc+k2fK73M28LsbWe+m9XH JwpkPr1ShjLnmbKeHiZjIAo+pLHGUEdxYk/L3sxIQgh+zSYGcbf7D4jq9jG5jJMdGzOg Ulog== X-Forwarded-Encrypted: i=1; AJvYcCWM4zT/BSk6potteyqq/VV0q0ENFIWQI0tVMni9l+AnUs/kkVHBmnPclU36tWIAY+ZIXrrR0UeqkK4MMxEP@postgresql.org X-Gm-Message-State: AOJu0YwVnjH/sUyGb9qQWkV++/irUK2bB3mrKcWlzr8CkwZyxHi7790g NFfl2L5Q6FUwzUh3YOTR6+L97RbKAdQzE6ier8VQtapfc3ScAo4xtPFrpw== X-Google-Smtp-Source: AGHT+IFgNQpdhk4P/USphzACNYY06rK1RSuGqZS42H0EPJtNaCDZ99K3grzoAXh28XQIjuMJsM1SCQ== X-Received: by 2002:a05:6602:640e:b0:81f:a428:8894 with SMTP id ca18e2360f4ac-82a11011702mr428896339f.5.1724952997595; Thu, 29 Aug 2024 10:36:37 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-82a1a499273sm40476339f.34.2024.08.29.10.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 10:36:37 -0700 (PDT) Date: Thu, 29 Aug 2024 12:36:35 -0500 From: Nathan Bossart To: Ayush Vatsa Cc: Robert Haas , 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=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Aug 29, 2024 at 10:17:57PM +0530, Ayush Vatsa wrote: > Please find attached the patch that re-enables > support for sequences within the pgstattuple extension. > I have also included the necessary test cases for > sequences, implemented in the form of regress tests. Thanks. Robert, do you have any concerns with this? +select * from pgstattuple('serial'); + table_len | tuple_count | tuple_len | tuple_percent | dead_tuple_count | dead_tuple_len | dead_tuple_percent | free_space | free_percent +-----------+-------------+-----------+---------------+------------------+----------------+--------------------+------------+-------------- + 8192 | 1 | 41 | 0.5 | 0 | 0 | 0 | 8104 | 98.93 +(1 row) I'm concerned that some of this might be platform-dependent and make the test unstable. Perhaps we should just select count(*) here. + /** + * Sequences don't fall under heap AM but are still + * allowed for obtaining tuple-level statistics. + */ I think we should be a bit more descriptive here, like the comment in verify_heapam.c: /* * Sequences always use heap AM, but they don't show that in the catalogs. * Other relkinds might be using a different AM, so check. */ -- nathan