Re: Backup From HotStandby - Mailing list pgsql-admin

From Rui DeSousa
Subject Re: Backup From HotStandby
Date
Msg-id 4BB72752-69DB-4ADA-A92F-4B7EE238A3EA@crazybean.net
Whole thread Raw
In response to Re: Backup From HotStandby  (Licio Matos <licio.matos@gmail.com>)
Responses Re: Backup From HotStandby
List pgsql-admin


On Aug 28, 2019, at 4:11 PM, Licio Matos <licio.matos@gmail.com> wrote:

@Rui DeSousa 

I am running this on the primary, the question is if i can run this same script on the replica.


You can based on what you told me about the snapshot; however, the pg_start_backup() command will fail.  

Note: What you are doing today most would consider it a “proper” online backup; when you start running the script on the replica then you will end up with a “crashed” backup.   The “crashed” backup only works as you can guarantee a point in time atomic view of all the data files using a single atomic snapshot.

You need to remove the pg_start_backup() and pg_stop_backup() commands from the script.   The backup should occur faster as it is no longer waiting on pg_start_backup() to issue checkpoint; however, that also means that recovery times increase for the same reason.  

pgsql-admin by date:

Previous
From: Licio Matos
Date:
Subject: Re: Backup From HotStandby
Next
From: Licio Matos
Date:
Subject: Re: Backup From HotStandby