From: | Robert Treat <rob(at)xzilla(dot)net> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Melanie Plageman <melanieplageman(at)gmail(dot)com>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie> |
Subject: | Re: Eagerly scan all-visible pages to amortize aggressive vacuum |
Date: | 2025-01-26 16:30:52 |
Message-ID: | CAJSLCQ31Wn2YFnHUxA2UqvORoCAnX4=ZAUOC2tMcioXOM_dgUQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 24, 2025 at 3:43 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Jan 24, 2025 at 3:02 PM Melanie Plageman
> <melanieplageman(at)gmail(dot)com> wrote:
> >
> > > + ereport(INFO,
> > > + (errmsg("Vacuum successfully froze %u eager scanned blocks of
> > > \"%s.%s.%s\". Now disabling eager scanning.",
> > >
> > > I predict that if Tom sees this, you will get complaints about both
> > > the wording of the message, which pretty clearly does not conform to
> > > style guidelines for a primary error message, and also about the use
> > > of the INFO level. Allow me to suggest DEBUG1 or DEBUG2 and "disabling
> > > eager scanning after freezing %u eagerly scanned blocks".
> >
> > I've used your wording. Just for future reference, are the style
> > guidelines I was violating the capitalization and punctuation? Are
> > these documented somewhere? Also, what is a primary error message?
> > INFO level? Or ones that use ereport and are translated? I looked at
> > other messages and saw that they don't capitalize the first word or
> > use punctuation, so I assume that those were problems.
>
> Yes. Primary error messages, i.e. errmsg(), are not capitalized and
> punctuated, unlike errdetail() and errhint() messages, which are.
>
> See https://www.postgresql.org/docs/current/error-style-guide.html
>
> INFO level is used for VERY few things. I can't tell you off the top
> of my head when it's appropriate, but I think the answer is "almost
> never".
>
Maybe, but one of the areas that INFO is used for is providing
additional details in VACUUM VERBOSE output, and this seems like it
would be pretty useful information to have if you are trying to
discern changes in i/o rate during a vacuum, or trying to tune the
failure rate setting, or several other related fields (including
automated capture by tools like pganalyze), so I believe INFO is the
right choice for this.
Robert Treat
https://xzilla.net
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2025-01-26 16:36:54 | Re: Convert sepgsql tests to TAP |
Previous Message | Tom Lane | 2025-01-26 16:19:57 | Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty? |