From: | Martin Marques <martin(dot)marques(at)2ndquadrant(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_basebackup --progress output for batch execution |
Date: | 2017-09-29 23:00:07 |
Message-ID: | 4fa60ea6-caa7-e6cf-a016-966189f0ee6e@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Some time ago I had to work on a system where I was cloning a standby
using pg_basebackup, that didn't have screen or tmux. For that reason I
redirected the output to a file and ran it with nohup.
I normally (always actually ;) ) run pg_basebackup with --progress and
--verbose so I can follow how much has been done. When done on a tty you
get a nice progress bar with the percentage that has been cloned.
The problem came with the execution and redirection of the output, as
the --progress option will write a *very* long line!
Back then I thought of writing a patch (actually someone suggested I do
so) to add a --batch-mode option which would change the behavior
pg_basebackup has when printing the output messages.
Attach is the patch. I'll be submitting it to the CF.
P.D.: I'm aware that there's a documentation patch missing. :)
Kind regards,
--
Martín Marqués http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Adding-an-option-to-pg_basebackup-to-output-messages.patch | text/x-patch | 3.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Nikita Glukhov | 2017-09-29 23:06:29 | Re: SQL/JSON in PostgreSQL |
Previous Message | Andres Freund | 2017-09-29 22:54:58 | Re: SendRowDescriptionMessage() is slow for queries with a lot of columns |