pg_basebackup wish list

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_basebackup wish list
Date: 2016-07-12 16:53:30
Message-ID: CAMkU=1x+GwjSayc57v6w87ij6iRGFWt=hVfM0B64b1_bPVKRqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've been having some adventures with pg_basebackup lately, and had
some suggestions based on those.

The --help message for pg_basebackup says:

-Z, --compress=0-9 compress tar output with given compression level

But -Z0 is then rejected as 'invalid compression level "0"'. The real
docs do say 1-9, only the --help message has this bug. Trivial patch
attached.

These ones I have not written code for yet:

The progress reporting for pg_basebackup is pretty terse:

858117/7060099 kB (12%), 0/1 tablespace

I think we should at least add a count-up timer showing the seconds it
has been running. I can always use my own stopwatch, but that is not
very friendly and easy to forget to start.

And maybe change the reporting units from kB to MB when the pre-scan
says the total size exceeds some threshold? At the same limit
pg_size_pretty does?

If I use the verbose flag, then the progress message includes the name
of the file being written to by the client. However, in -Ft mode, this
is always "something/base.tar" (unless you are using tablespaces),
which is not terribly useful. Should it instead report the name of the
file being read on the server end?

When using pg_basebackup from the wrong version, the error message it
reports is pretty unhelpful:

pg_basebackup: could not initiate base backup: ERROR: syntax error

Could we have a newer version of pg_basebackup capture that error and
inject a HINT, or is there a better solution for getting a better
error message?

Cheers,

Jeff

Attachment Content-Type Size
pg_basebackup_compress.patch application/octet-stream 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-07-12 17:10:36 Re: Showing parallel status in \df+
Previous Message Stephen Frost 2016-07-12 16:45:57 Re: Showing parallel status in \df+