Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch
Date
Msg-id ZtCxo95K_bqGbmNQ@nathan
Whole thread Raw
In response to Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch  (Ayush Vatsa <ayushvatsa1810@gmail.com>)
Responses Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch
Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)
Next
From: Nathan Bossart
Date:
Subject: Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch