On 2/19/26 21:23, Sami Imseih wrote:
3/

+                       elog(DEBUG1,
+                               "ANALYZE (MISSING_STATS_ONLY):
skipping relation \"%s\"",
+                               RelationGetRelationName(onerel));

I think logging should be at info level, and we should only log when
skipping a relation


Also, I think it's better to use ereport like is being done for the other
ANALYZE logging, i.e.

```
                         appendStringInfo(&buf,
                                                          _("WAL usage:
%" PRId64 " records, %" PRId64 " full page images, %" PRIu64 " bytes,
%" PRIu64 " full page image bytes, %" PRId64 " buffers full\n"),
                                                          walusage.wal_records,
                                                          walusage.wal_fpi,
                                                          walusage.wal_bytes,
                                                          
walusage.wal_fpi_bytes,

walusage.wal_buffers_full);
                         appendStringInfo(&buf, _("system usage: %s"),
pg_rusage_show(&ru0));

                         ereport(verbose ? INFO : LOG,
                                         (errmsg_internal("%s", buf.data)));
```

+1

I agree that in VERBOSE mode we should display a message when the relation is skipped. I suggest something along the lines of:

INFO:    Skipping analyzing "database.namespace.relation"

This would be consistent with the style already used in do_analyze_rel(). Since this is executed ANALYZE, and no statistics are actually collected , I don't think we need to display any additional details beyond this single line.

--
Best regards.
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/

Reply via email to