pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Banck <mbanck@gmx.net>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [patch] pg_basebackup: mention that spread checkpoints are the default in --help
Date: Thu, 26 Oct 2023 10:27:51 +0200
Message-ID: <653a2308.170a0220.361af.f21f@mx.google.com> (raw)
In-Reply-To: <70aea53e-8c02-46a0-a458-e86bd5ca188d@eisentraut.org>
References: <6530f954.170a0220.5637c.9209@mx.google.com>
	<70aea53e-8c02-46a0-a458-e86bd5ca188d@eisentraut.org>

Hi,

On Wed, Oct 25, 2023 at 04:36:41PM +0200, Peter Eisentraut wrote:
> On 19.10.23 11:39, Michael Banck wrote:
> > Hi,
> > 
> > I believed that spread (not fast) checkpoints are the default in
> > pg_basebackup, but noticed that --help does not specify which is which -
> > contrary to the reference documentation.
> > 
> > So I propose the small attached patch to clarify that.
> 
> >  printf(_("  -c, --checkpoint=fast|spread\n"
> >-          "                         set fast or spread checkpointing\n"));
> >+          "                         set fast or spread (default)
> checkpointing\n"));
> 
> Could we do like
> 
>   -c, --checkpoint=fast|spread
>                          set fast or spread checkpointing
>                          (default: spread)
> 
> This seems to be easier to read.

Yeah, we could do that. But then again the question pops up what to do
about the other option that mentions defaults (-F) and the others which
have a default but it is not spelt out yet (-X, -Z at least) (output is
still from v15, additional options have been added since):

  -F, --format=p|t       output format (plain (default), tar)
  -X, --wal-method=none|fetch|stream
                         include required WAL files with specified method
  -Z, --compress=0-9     compress tar output with given compression level

So, my personal opinion is that we should really document -c because it
is quite user-noticable compared to the others.
 
So attached is a new version with just your proposed change for now.


Michael

Attachments:

v2-0001-pg_basebackup-Mention-that-spread-checkpoints-are.patch (text/x-diff, 998B) download From 817f71f2eaa8814a30320bc1ef97c1ec8a95f083 Mon Sep 17 00:00:00 2001 From: Michael Banck <michael.banck@credativ.de> Date: Thu, 19 Oct 2023 11:37:11 +0200 Subject: [PATCH v2] pg_basebackup: Mention that spread checkpoints are the default in --help --- src/bin/pg_basebackup/pg_basebackup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 1a8cef345d..9957fb4f54 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -408,6 +408,7 @@ usage(void) printf(_("\nGeneral options:\n")); printf(_(" -c, --checkpoint=fast|spread\n" " set fast or spread checkpointing\n")); + " (default: spread)\n")); printf(_(" -C, --create-slot create replication slot\n")); printf(_(" -l, --label=LABEL set backup label\n")); printf(_(" -n, --no-clean do not clean up after errors\n")); -- 2.39.2

view thread (10+ messages)  latest in thread

Message-ID: <653a2308.170a0220.361af.f21f@mx.google.com>
Permalink:  ../653a2308.170a0220.361af.f21f@mx.google.com/
Also on:    postgresql.org/message-id/653a2308.170a0220.361af.f21f@mx.google.com

 ·  · 

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: mbanck@gmx.net, peter@eisentraut.org
  Subject: Re: [patch] pg_basebackup: mention that spread checkpoints are the default in --help
  In-Reply-To: <653a2308.170a0220.361af.f21f@mx.google.com>
  References: <6530f954.170a0220.5637c.9209@mx.google.com> <70aea53e-8c02-46a0-a458-e86bd5ca188d@eisentraut.org> <653a2308.170a0220.361af.f21f@mx.google.com>

* 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