Hi Justin,
Thank you for your comments.
I attached the latest patch(v11) to the previous email.
>
> + * Get its all ancestors to propagate changes_since_analyze count.
> + * However, when ANALYZE inheritance tree, we get ancestors of
> + * toprel_oid to avoid needless counting.
>
> => I don't understand that comment.
>
I fixed that comment.
> + /* Find all members of inheritance set taking AccessShareLock */
> + children = find_all_inheritors(relid, AccessShareLock, NULL);
>
> => Do you know that returns the table itself ? And in pg14dev, each
> partitioned table has reltuples = -1, not zero...
>
> + /* Skip foreign partitions */
> + if (childclass->relkind == RELKIND_FOREIGN_TABLE)
> + continue;
>
> => Michael's suggrestion is to use RELKIND_HAS_STORAGE to skip both foreign and
> partitioned tables.
>
I overlooked that. Revised that according to your comments.
> Also, you called SearchSysCacheCopy1, but didn't free the tuple. I don't think
> you need to copy it anyway - just call ReleaseSysCache().
>
Fixed it.
> Regarding the counters in pg_stat_all_tables: maybe some of these should be
> null rather than zero ? Or else you should make an 0001 patch to fully
> implement this view, with all relevant counters, not just n_mod_since_analyze,
> last_*analyze, and *analyze_count. These are specifically misleading:
>
> last_vacuum |
> last_autovacuum |
> n_ins_since_vacuum | 0
> vacuum_count | 0
> autovacuum_count | 0
>
I haven't modified this part yet, but you meant that we should set
null to counters
about vacuum because partitioned tables are not vacuumed?
--
Best regards,
Yuzuko Hosoya
NTT Open Source Software Center