public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: docu bug?
Date: Tue, 20 Feb 2018 10:25:05 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Mon, Feb 19, 2018 at 01:54:24PM +0000, PG Doc comments form wrote:
> The sample works with a NON-persistent connection (psql -c):
>
> <quote>
> 25.3.6.1. Standalone Hot Backups
> ... touch /var/lib/pgsql/backup_in_progress
> psql -c "select pg_start_backup('hot_backup');"
> tar -cf /var/lib/pgsql/backup.tar /var/lib/pgsql/data/
> psql -c "select pg_stop_backup();"
> rm /var/lib/pgsql/backup_in_progress
> tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
> ...
> </quote>
This uses the set of exclusive backup APIs, so with non-persistent
connections the backup can be correctly completed. Non-exclusive
backups can be defined using 'false' as third argument of
pg_start_backup() and first argument of pg_stop_backup(). Note that for
pg_start_backup you would also need to define the second boolean
argument to decide if a checkpoint should be immediately taken or not.
So you would have basically the following flow on a persistem
connection:
=# SELECT pg_start_backup('my_backup', true_or_false, false);
-- keep connection alive and do stuff.
=# SELECT pg_stop_backup(false);
Do you think that the section "Tips and Examples" should mention
that an exclusive backup method is used for this example? This may
reduce the confusion.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (5+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: docu bug?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox