Re: PostgreSQL 12: Cryptic documentation

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Inder <robert(at)interactive(dot)co(dot)uk>, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL 12: Cryptic documentation
Date: 2020-08-15 16:21:54
Message-ID: CAKFQuwaM_2ocg33k6esUA6_4dZEkmaEPubQc=QGFpNR3VmmN=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Sat, Aug 15, 2020 at 6:58 AM PG Doc comments form <noreply(at)postgresql(dot)org>
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/12/app-pgbasebackup.html
> Description:
>
> The pg_basebackup page says that the --waldir parameter "Specifies the
> location for the write-ahead log directory. waldir must be an absolute
> path.
> The write-ahead log directory can only be specified when the backup is in
> plain mode." But it says nothing at all about what it is actually used
> for.
>
> You may think it is obvious. And I thought I could guess - it would be the
> directory containing the WAL files for the database, right?

It's not the directory "of" the write-ahead log directory (i.e., existing)
but the directory "for" the write-ahead log directory (i.e. in the
backup). All information about the database being backed up can be gleaned
from the connection the pg_basebackup makes to the server.

Which makes me realise I must have been completely wrong and I have no idea
> what it for.
>

I believe its purpose is to allow the user to specify a different directory
for the necessary restoration WAL files to be placed in compared to the
working WAL directory that will be created under the pgdata directory.

As with most things there is always room for improvement. In this case,
though, I'm not seeing anything wrong with the direct wording provided.
The behavior of the program, and general context, means that the directory
must be one that is being created during the backup and WAL copied into
it. And the error message means that in the rare case that the users
mis-interprets it they will be told. And as in this case the mailing lists
are responsive to clearing up individual confusion should the need arise.

Adding here, and in other places, explicit documentation that "this
specifies a location in the backup" just makes the documentation more
verbose. Maybe in this case not enough to reject a proposed patch but
enough so that I at least don't have a desire to write one.

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2020-08-15 16:38:47 Re: PostgreSQL 12: Cryptic documentation
Previous Message PG Doc comments form 2020-08-15 12:23:08 PostgreSQL 12: Cryptic documentation