pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rui DeSousa <rui@crazybean.net>
To: Licio Matos <licio.matos@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Backup From HotStandby
Date: Wed, 28 Aug 2019 16:38:47 -0400
Message-ID: <4BB72752-69DB-4ADA-A92F-4B7EE238A3EA@crazybean.net> (raw)
In-Reply-To: <CAK6Tc4Ocmc-AhC1m7TYPGOvb32EaQPPygn4WSK5r--j72OhY5w@mail.gmail.com>
References: <CAK6Tc4OFMQA9Nb7rh2bnQkUyHjO=oAThWFGWTP0P-c9+jzAWXQ@mail.gmail.com>
	<CAMkU=1yOQ=9sGktkodafbsS_V0Fdtmxio_NkoGXnnnOXbWh8GQ@mail.gmail.com>
	<CAK6Tc4P+pKCeu31RZe-Exi9KC=mLVX6DSdGe6v+zCikjdcCv=g@mail.gmail.com>
	<61A32609-4552-4F4D-9B88-EF15C06010C1@crazybean.net>
	<CAK6Tc4MPUUTK1y0pjW=ON2R6Y-O+ch+T5G_pkb6p4vFxSCFV9A@mail.gmail.com>
	<1F62FCE5-E2AB-4307-81C4-859208B24865@crazybean.net>
	<CAK6Tc4Ocmc-AhC1m7TYPGOvb32EaQPPygn4WSK5r--j72OhY5w@mail.gmail.com>



> On Aug 28, 2019, at 4:11 PM, Licio Matos <licio.matos@gmail.com> wrote:
> 
> @Rui DeSousa <mailto:rui@crazybean.net> 
> 
> 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.  

view thread (10+ messages)  latest in thread

Message-ID: <4BB72752-69DB-4ADA-A92F-4B7EE238A3EA@crazybean.net>
Permalink:  ../4BB72752-69DB-4ADA-A92F-4B7EE238A3EA@crazybean.net/
Also on:    postgresql.org/message-id/4BB72752-69DB-4ADA-A92F-4B7EE238A3EA@crazybean.net

 · 

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: pgsql-admin@postgresql.org
  Cc: rui@crazybean.net, licio.matos@gmail.com, jeff.janes@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Backup From HotStandby
  In-Reply-To: <4BB72752-69DB-4ADA-A92F-4B7EE238A3EA@crazybean.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