public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tatsuya Kawata <[email protected]>
To: Chao Li <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: Standardize relation name formatting in ANALYZE messages
Date: Tue, 13 Jan 2026 00:57:00 +0900
Message-ID: <CAHza6qeecqqzZY8urYz2B_8zQsdbO3SgdpGRCZXmiSq1u6RFww@mail.gmail.com> (raw)
In-Reply-To: <CAEoWx2mAwXnxVWTP=dgwA98dJ7JxzxM8qToaxAGuByHN1-=oNQ@mail.gmail.com>
References: <CAEoWx2mAwXnxVWTP=dgwA98dJ7JxzxM8qToaxAGuByHN1-=oNQ@mail.gmail.com>

Hi Chao-san,

Thanks for the patch and testing patch [1]!
This is my first review, so please forgive any oversights or mistakes on my
part.

I ran some tests to verify the output and everything seems to work
correctly.
I have two very minor points I'd like to comment on:

1.
A similar function, generate_qualified_relation_name(), is already defined
as a static function at src/backend/utils/adt/ruleutils.c:13246 and is used
in several places within that file.
One option to consider: to avoid duplicate implementations and ensure
consistent behavior, this function could be exported via ruleutils.h and
called from analyze.c by passing RelationGetRelid(rel). However, this would
require changes to ruleutils.h, so please consider whether that is
appropriate for the scope of this patch.


2.
As you mentioned, the existing log output includes the database name in the
"finished" message.
Including the database name might provide slightly more information.

Current ANALYZE VERBOSE log
```
postgres=# ANALYZE VERBOSE parent_schema.sales;
INFO:  analyzing "parent_schema.sales" inheritance tree
INFO:  "sales_2024": scanned 1 of 1 pages, containing 2 live rows and 0
dead rows; 2 rows in sample, 2 estimated total rows
INFO:  "sales_2025": scanned 1 of 1 pages, containing 2 live rows and 0
dead rows; 2 rows in sample, 2 estimated total rows
INFO:  finished analyzing table "postgres.parent_schema.sales"
avg read rate: 3.906 MB/s, avg write rate: 0.000 MB/s
buffer usage: 155 hits, 2 reads, 0 dirtied
WAL usage: 9 records, 0 full page images, 1388 bytes, 0 full page image
bytes, 0 buffers full
system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
```

Current AUTOANALYZE log
```
2026-01-12 23:53:59.863 JST [28190] LOG:  automatic analyze of table
"postgres.public.parent_table"
avg read rate: 0.000 MB/s, avg write rate: 0.000 MB/s
buffer usage: 113 hits, 0 reads, 0 dirtied
WAL usage: 4 records, 0 full page images, 2282 bytes, 0 full page image
bytes, 0 buffers full
system usage: CPU: user: 0.01 s, system: 0.00 s, elapsed: 0.01 s
```

Regards,
Tatsuya Kawata


view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Standardize relation name formatting in ANALYZE messages
  In-Reply-To: <CAHza6qeecqqzZY8urYz2B_8zQsdbO3SgdpGRCZXmiSq1u6RFww@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox