From: Stephen Frost <sfrost@snowman.net>
To: Raghavendra Rao J S V <raghavendrajsv@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_basebackup is taking more time than expected
Date: Sat, 13 Jan 2018 11:22:21 -0500
Message-ID: <20180113162221.GD2416@tamriel.snowman.net> (raw)
In-Reply-To: <CAEHH7R5sBCRyiu5_qanE741VWGE-LPbVnCdxJZh2U1y1BRPW7A@mail.gmail.com>
References: <CAEHH7R4=_GN+LSsj0YZOXZ13yc=Gk9umJOLNopjS=imK0c1mWA@mail.gmail.com>
<20180112130754.GF2416@tamriel.snowman.net>
<CAEHH7R5sBCRyiu5_qanE741VWGE-LPbVnCdxJZh2U1y1BRPW7A@mail.gmail.com>
Greetings,
Please don't top-post on the PG mailing lists.
* Raghavendra Rao J S V (raghavendrajsv@gmail.com) wrote:
> pg_basebackup utility depends on which are the parameters?
I'm not sure what you're asking here.
> Is there any possibility to run the pg_basebackup in multi thread?
No, not today. There's been discussion about making it multi-threaded
but I seriously doubt that'll happen for v11 at this point.
> To improve the speed of the backup of database using pg_basebackup utility
> we shutdown the database and started alone database services. Till that
> time other sevices won't run. We observed some improvement but any other
> things we need to perform to reduce the time taken by the pg_basebackup
> utility.
Sure, reducing the load of the system might make pg_basebackup a little
faster, but seems unlikely to help it a lot in this case, and it means
you have downtime which might not be ideal.
> We are using below command to take the backup of the database. Any
> improvements to reduce the time taken by backup statement.
>
> $PGHOME/bin/pg_basebackup -p 5433 -U postgres -P -v -x --format=tar --gzip
> --compress=6 --pgdata=- -D /opt/backup_db
Might be faster if you didn't compress it, but, of course, then you
wouldn't have a compressed backup.
This is exactly the kind of issue that lead to the development of
pgBackRest. Larger databases really do need multi-threaded backups and
there weren't any backup tools for PG which were multi-threaded when we
started. There's a few other options now, which is good, but
pg_basebackup isn't one of them.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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-general@postgresql.org
Cc: sfrost@snowman.net, raghavendrajsv@gmail.com
Subject: Re: pg_basebackup is taking more time than expected
In-Reply-To: <20180113162221.GD2416@tamriel.snowman.net>
References: <CAEHH7R4=_GN+LSsj0YZOXZ13yc=Gk9umJOLNopjS=imK0c1mWA@mail.gmail.com> <20180112130754.GF2416@tamriel.snowman.net> <CAEHH7R5sBCRyiu5_qanE741VWGE-LPbVnCdxJZh2U1y1BRPW7A@mail.gmail.com> <20180113162221.GD2416@tamriel.snowman.net>
* 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