pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
To: h@nathan
Cc: Robert Treat <rob@xzilla.net>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: small fix for pg_overexplain docs
Date: Wed, 16 Jul 2025 12:26:04 -0500
Message-ID: <aHfgrEXz6kqpBXTD@nathan> (raw)
In-Reply-To: <CAEZATCUEaasoxNPSva5mOWJ-Lu92U6ryprB2Dgdt-_9DEdCoRw@mail.gmail.com>
References: <aHVWKM8l8kLlZzgv@nathan>
	<CAKFQuwZx9XjKhmgJeJa=6p3XePWadETJtMauhr+2XY8Nkb8OcA@mail.gmail.com>
	<CABV9wwPuuMgSYVX9-bZA+wae182tU0b=0ooGU0-1c6cgKTDJHQ@mail.gmail.com>
	<CAEZATCUEaasoxNPSva5mOWJ-Lu92U6ryprB2Dgdt-_9DEdCoRw@mail.gmail.com>

On Tue, Jul 15, 2025 at 04:14:44PM +0100, Dean Rasheed wrote:
> On Tue, 15 Jul 2025 at 04:17, Robert Treat <rob@xzilla.net> wrote:
>> On Mon, Jul 14, 2025 at 3:22 PM David G. Johnston
>> > The pg_overexplain extends EXPLAIN with new options that provide...
>> > Suggest instead:
>> > The pg_overexplain module provides EXPLAIN with new options intended to assist with debugging of and development of the planner.
>> > (replacing the first two sentences of the existing paragraph)
>>
>> +1 for consistency, though I'd argue "intended to assist with
>> debugging and development of the planner" would be easier to read (in
>> either one sentence or two sentence format).
> 
> +1. I find that easier to read.

I disagree.  While it might sound nicer, the extra "of" establishes
parallelism to make it clear that the module is intended for debugging of
the planner and not debugging in general.  I also see little need to
combine the two sentences.  The first establishes at a high-level what the
module does, and the second provides more details.  Combining the two as
proposed also loses context, i.e., "provide additional output" and "rather
than for general use" are removed.  We could try to retain those pieces,
but then we're just combining two medium-sized sentences into a long one
that is more difficult to read.

FWIW there are counterexamples to the "The XXX module..." pattern, too
(e.g., auth_delay, basebackup_to_shell, basic_archive, bloom).  But I'm
fine with using it here since that seems to be the preference.

> Something else that's missing is instructions on how to load the
> module, which usually follows this first paragraph.

Good point.  That should probably look something like this, which is mostly
lifted from auto_explain:

	To use it, simply load it into the server.  You can load it into an
	individual session:

	LOAD 'pg_overexplain';

	(You must be superuser to do that.)  You can also preload it into some
	or all sessions by including pg_overexplain in
	session_preload_libraries or shared_preload_libraries in
	postgresql.conf.

As an aside, the superuser note isn't totally true because administrators
can put stuff in $libdir/plugins/ to allow non-superusers to LOAD it.
Maybe we should just remove the superuser note in the module docs.

-- 
nathan





view thread (12+ messages)  latest in thread

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

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, dean.a.rasheed@gmail.com, h@nathan, rob@xzilla.net, david.g.johnston@gmail.com
  Subject: Re: small fix for pg_overexplain docs
  In-Reply-To: <aHfgrEXz6kqpBXTD@nathan>
  References: <aHVWKM8l8kLlZzgv@nathan> <CAKFQuwZx9XjKhmgJeJa=6p3XePWadETJtMauhr+2XY8Nkb8OcA@mail.gmail.com> <CABV9wwPuuMgSYVX9-bZA+wae182tU0b=0ooGU0-1c6cgKTDJHQ@mail.gmail.com> <CAEZATCUEaasoxNPSva5mOWJ-Lu92U6ryprB2Dgdt-_9DEdCoRw@mail.gmail.com> <aHfgrEXz6kqpBXTD@nathan>

* 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