Re: doc: Improve wal_level and effective_wal_level GUC around logical replication

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: doc: Improve wal_level and effective_wal_level GUC around logical replication
Date: 2026-04-08 04:28:18
Message-ID: CAKFQuwbmDM_X44PwxUw2=och-cs1TMMtBvNPuaB_u5EBbaiG2A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you, and the others, for the reviews.

On Tuesday, April 7, 2026, shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:

> Few comments:
>
> 1)
> + Running read-only queries on a standby server.
>
> Looks incomplete and disconnected from previous sentence.

Yeah, I missed that one.

>
> 2)
> + level used by the system. Namely, whether replica has been
> promoted to
> + logical (minimal never promotes).
>
> We shall replace replica, logical, minimal with below
> <literal>replica</literal>
> <literal>logical</literal>
> <literal>minimal</literal>

Yeah, I need to do a markup pass too apparently. Though I do question
whether we are being too rote about these. In this sentence yes I use the
actual labels but it’s more about concept than talking about something
you’d literally type somewhere. One doesn’t promote a literal, they
promote the operating mode of the server which is then reflected by the
change of a value.

>
> Also shall we add 'wal_level'? Otherwise, 'replica' on its own could
> be understood as a replica server:
>
> Namely, whether wal_level replica has been promoted to ....

>
The preceding sentence to which “namely” links talks about the levels. But
I’ll give it a second look. From my reply above, writing “WAL level has
been promoted to logical from replica”, is probably a better structure.

> 3)
> + The <xref linkend="guc-effective-wal-level"/> parameter
> reports the actual
> + level used by the system. Namely, whether replica has been
> promoted to
> + logical (minimal never promotes).
> + This parameter can only be set at server start.
>
> "This" here is misleading. Does this refer to wal_level or
> effective_wal_level?

When talking about where/when a setting can specified, “this” always refers
to the setting being documented. I’m doubtful of the need to reword things
so that some other setting being talked about doesn’t get confused
instead. The fact that we say effective WAL level is basically a runtime
derived setting in the prior sentence reinforces this belief. And we try
to keep this sentence consistently at the end of the description. Maybe it
needs its own paragraph though? I’ll consider that.

>
> 4)
> Below that is <literal>minimal</literal>,
>
> Shall we change "that" to <literal>replica</literal> to avoid any
> confusion?

I’m on the fence at the moment. This entire section needs a relook anyway
and I’ll keep all these in mind.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-04-08 04:53:33 Re: Logical Replication - revisit `is_table_publication` function implementation
Previous Message Andres Freund 2026-04-08 04:09:53 Re: Stack-based tracking of per-node WAL/buffer usage