Re: Difference in the tablespace folders on primary and secondary nodes

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Abhishek Bhola <abhishek(dot)bhola(at)japannext(dot)co(dot)jp>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Difference in the tablespace folders on primary and secondary nodes
Date: 2023-07-27 02:39:03
Message-ID: CAOuzzgrArF8FwrkTw02d=yDZU8wEvdscYmrrLr74LY7WC_vg+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

On Wed, Jul 26, 2023 at 21:31 Abhishek Bhola <abhishek(dot)bhola(at)japannext(dot)co(dot)jp>
wrote:

> Thank you for the very detailed reply. I tried the above method and it
> works. I'm still setting up pgBackRest.
>
> I have one last question if you can answer that too please.
>
>> A delta restore will only restore those
>> files on the replica which are different from what was in the backup and
>> that can be done using timestamp/file-size because pgBackRest tracks
>> that information and will set it on restore.
>
> As per my understanding, primary and standby nodes can have exactly the
> same data, with no data corruption, but still have different timestamps on
> the data files in the tablespace folder. Please correct me if I am wrong.
> If that's the case, then will the backup (incremental/delta) taken from
> the primary node on pgBackRest, restore the files on the secondary node,
> just because they have a different timestamp? Or does pgBackRest have some
> mechanism to detect this and skip those files? Please assume for this case
> that we ran out of capacity to store the WAL segments from the primary
> while the secondary node was down.
>

When pgbackrest does a restore, it will also set the timestamps for the
files that it restores to what the timestamp was in the manifest. This
allows us to detect if those files were changed since the restore happened.
If they’ve not changed since the restore, then we skip checking them to see
if they need to be restored from the repository.

Thanks,

Stephen

>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2023-07-27 03:36:20 Re: How to improve the performance of my SQL query?
Previous Message Abhishek Bhola 2023-07-27 01:30:34 Re: Difference in the tablespace folders on primary and secondary nodes