AW: docu bug?

From: "Zwettler Markus (OIZ)" <Markus(dot)Zwettler(at)zuerich(dot)ch>
To: Michael Paquier <michael(at)paquier(dot)xyz>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: AW: docu bug?
Date: 2018-02-20 08:00:35
Message-ID: 77105e802f334fcdba8e774e98a9482c@SZHM22343.global.szh.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Yes. I think the exclusive backup method should be mentioned especially as it is the older one.

- Markus

-----Ursprüngliche Nachricht-----
Von: Michael Paquier [mailto:michael(at)paquier(dot)xyz]
Gesendet: Dienstag, 20. Februar 2018 02:25
An: Zwettler Markus (OIZ) <Markus(dot)Zwettler(at)zuerich(dot)ch>; pgsql-docs(at)lists(dot)postgresql(dot)org
Betreff: Re: docu bug?

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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2018-02-20 09:55:32 Re: docu bug?
Previous Message Michael Paquier 2018-02-20 01:25:05 Re: docu bug?