[PATCH] analyze: move elevel calculation into do_analyze_rel()

From: Лев Николаев <lev(dot)nikolaev(at)tantorlabs(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] analyze: move elevel calculation into do_analyze_rel()
Date: 2026-03-30 13:03:18
Message-ID: 238121774875528@mail.360.yandex.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi hackers,

While reading analyze.c in current master, I noticed a small cleanup opportunity in the ANALYZE code path.

Currently, analyze_rel() computes elevel from params.options, but does not use it directly. It only passes the value down to do_analyze_rel(). At the same time, do_analyze_rel() already receives params and derives verbose from params.options for its own purposes.

The attached patch moves the elevel calculation into do_analyze_rel() and removes the extra elevel argument from its declaration, definition, and call sites.

No behavioral change is intended here. The logging level selection remains the same; the calculation is just moved closer to the actual use sites.

Comments and feedback would be appreciated.

 

--

Best regards,

Lev Nikolaev,

Tantor Labs LLC,

https://tantorlabs.com/

Attachment Content-Type Size
unknown_filename text/html 890 bytes
0001-analyze-move-elevel-calculation-into-do_analyze_rel.patch text/x-diff 3.2 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2026-03-30 13:09:32 Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Previous Message Robert Treat 2026-03-30 12:56:12 Re: Add pg_stat_autovacuum_priority