pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: rsindlin@gmail.com
Subject: Information on setting the message level is too hard to find if you search for "debug"
Date: Thu, 20 Apr 2023 17:08:05 +0000
Message-ID: <168201048588.2127921.4364221899511300364@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/15/runtime-config-client.html
Description:

It took me a good bit of searching to find the page for remembering that
client_min_messages was the variable for the debug level.  I think my basic
stumbling block was that the syntax for RAISE uses DEBUG as the keyword, but
"message level" is the term used elsewhere; so, I was looking for how to set
the debug level rather than the message level.  I'd just forgotten the
lingo, but knew I'd changed it a long time ago in a galaxy far away, and
would find it eventually.

I'd searched for 'debug' and got these results:
https://www.postgresql.org/search/?u=%2Fdocs%2F10%2F&q=DEBUG
I also searched for 'debug-level' and get even fewer results:
https://www.postgresql.org/search/?u=%2Fdocs%2F10%2F&q=debug-level
Trying 'debug set' gets
https://www.postgresql.org/search/?u=%2Fdocs%2F15%2F&q=DEBUG+set

The result that looks most promising for 'debug' (and the only result for
'debug-level' is

> 9. PostgreSQL: Documentation: 10: postgres [0.02]
> ...debug-level Sets the debug level. The higher this value is set, the
more debugging...
> https://www.postgresql.org/docs/10/app-postgres.html

and the app-postgres.html page indeed says "-d debug-level    Sets the debug
level..."

A Google search finally got me to:
https://www.google.com/search?q=postgres+set+debug-level&rlz=1C5GCEM_enUS1015US1016&oq=postg...

Google made it easy (doh!) but I'd been staying in the postgres.org
ecosystem and using the internal search.

So, a couple of suggestions:
 - I think that on https://www.postgresql.org/docs/15/app-postgres.html,
under the `-d` description, it would be helpful to include a link to
https://www.postgresql.org/docs/10/runtime-config-logging.html#GUC-LOG-MIN-MESSAGES
and perhaps
https://www.postgresql.org/docs/10/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES
as ways to override the value initially specified by -d (disclaimer: I don't
know if '-d' can be overwritten; I don't run postgres servers)
 - Perhaps under client_min_messages on
https://www.postgresql.org/docs/10/runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES
make a reference something "this sets the debug level for the current
session"
 - Perhaps under log_min_messages on
https://www.postgresql.org/docs/10/runtime-config-logging.html#GUC-LOG-MIN-MESSAGES
a similar statement that "this is a [distinct | related | overriding]
setting for the '-d debug-level' when [starting
Postgres](https://www.postgresql.org/docs/15/app-postgres.html)";
 - The page
https://www.postgresql.org/docs/11/plpgsql-errors-and-messages.html has
links to both 'client_min_messages' and 'log_min_messages' and it's probably
my fault for skimming the page too fast.   It still strikes me odd, though,
that searching for 'set DEBUG level' doesn't pop this page to the top, but
lets it sit down at #10 with a relevance(?) of [0.00]

Some of these ideas may be better suited for a "Note" box on the page;
basically, having some way to improve the search results to bring these
pages to the top is the central concern here.... and I had found it
personally frustrating enough to take the time to write this tome :- )


Message-ID: <168201048588.2127921.4364221899511300364@wrigleys.postgresql.org>
Permalink:  ../168201048588.2127921.4364221899511300364@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/168201048588.2127921.4364221899511300364@wrigleys.postgresql.org

 · 

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: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, rsindlin@gmail.com
  Subject: Re: Information on setting the message level is too hard to find if you search for "debug"
  In-Reply-To: <168201048588.2127921.4364221899511300364@wrigleys.postgresql.org>

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

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