Subject: Standardize relation name formatting in ANALYZE messages

From: Chao Li <[email-masked]>
Date: Thu, 8 Jan 2026 14:20:25 +0800

Hi Hacker,

While testing patch [1], I noticed that ANALYZE VERBOSE currently reports
the same relation name in inconsistent forms within a single command
output. For example:
```
evantest=# ANALYZE VERBOSE t_heap;
INFO:  analyzing "public.t_heap"
INFO:  "t_heap": scanned 173 of 173 pages, containing 10000 live rows and 0
dead rows; 10000 rows in sample, 10000 estimated total rows
INFO:  finished analyzing table "evantest.public.t_heap"
avg read rate: 98.805 MB/s, avg write rate: 2.298 MB/s
buffer usage: 164 hits, 215 reads, 5 dirtied
WAL usage: 11 records, 5 full page images, 27804 bytes, 26912 full page
image bytes, 0 buffers full
system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.01 s
```

Here, the three INFO lines refer to the same table using three different
formats: schema.table, unqualified table name, and database.schema.table.

For readability and consistency, it seems preferable to use a single,
stable formatting for relation names in ANALYZE output. This patch updates
ANALYZE-related messages to consistently format relation names using
quote_qualified_identifier(schema, relation), which is already the common
convention used across the backend.

This is a cosmetic change only; it does not affect ANALYZE behavior. With
the patch, the output now looks like:
```
evantest=# ANALYZE VERBOSE t_heap;
INFO:  analyzing "public.t_heap"
INFO:  "public.t_heap": scanned 173 of 173 pages, containing 10000 live
rows and 0 dead rows; 10000 rows in sample, 10000 estimated total rows
INFO:  finished analyzing table “public.t_heap”
.. omit rest ...
```

[1]
https://postgr.es/m/[email-masked]

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/