pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: [Beginner Question] Will the backup wal file take too much storage space?
Date: Tue, 13 Jun 2023 09:50:41 -0500
Message-ID: <089c97fd-4575-98f2-6b74-10e82ffc1b9e@gmail.com> (raw)
In-Reply-To: <CA+bJJbz9xDGgdo6N1n6S=DAk4synSZQxow_2gM9FKdPV47v3LA@mail.gmail.com>
References: <tencent_4628EAB456FD4C97206DE368DDE0A4D95C09@qq.com>
	<CA+bJJbz9xDGgdo6N1n6S=DAk4synSZQxow_2gM9FKdPV47v3LA@mail.gmail.com>

On 6/13/23 06:34, Francisco Olarte wrote:
[snip]
> But if you want to restore to ANY point in time you would need a copy
> of the initial state of the database and ALL the wal files. Normally
> you do not want to do this, at most you want to restore to "any point
> in the last 3 days", in which case you will need a copy of the
> datafiles from 3 days ago plus all the wals from there plus change.
[snip]
> This is confusing. WALs are not backup per se, they are a recovery
> mechanism. You do a backup of the main data files and the wal files
> because you do not want to stop the world to do the backup. The COPY
> of the datafiles and the wals is the backup. If you want to restore to
> a very far point in a DB which has very large files it will take a lot
> of space. But if you did it that way the copy of the data files will
> not be in the initial ( empty ) copy of the datafiles, it will just be
> in the wal copy, and it needs to be somewhere if you want to do that.

PgBackRest (and presumably barman) handles all this for you.  Even 
compresses the WAL and data files.

-- 
Born in Arizona, moved to Babylonia.





view thread (3+ messages)

Message-ID: <089c97fd-4575-98f2-6b74-10e82ffc1b9e@gmail.com>
Permalink:  ../089c97fd-4575-98f2-6b74-10e82ffc1b9e@gmail.com/
Also on:    postgresql.org/message-id/089c97fd-4575-98f2-6b74-10e82ffc1b9e@gmail.com

 · 

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 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: ronljohnsonjr@gmail.com
  Subject: Re: [Beginner Question] Will the backup wal file take too much storage space?
  In-Reply-To: <089c97fd-4575-98f2-6b74-10e82ffc1b9e@gmail.com>
  References: <tencent_4628EAB456FD4C97206DE368DDE0A4D95C09@qq.com> <CA+bJJbz9xDGgdo6N1n6S=DAk4synSZQxow_2gM9FKdPV47v3LA@mail.gmail.com> <089c97fd-4575-98f2-6b74-10e82ffc1b9e@gmail.com>

* 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