Re: Difference in the tablespace folders on primary and secondary nodes - Mailing list pgsql-general

From Stephen Frost
Subject Re: Difference in the tablespace folders on primary and secondary nodes
Date
Msg-id CAOuzzgrArF8FwrkTw02d=yDZU8wEvdscYmrrLr74LY7WC_vg+Q@mail.gmail.com
Whole thread Raw
In response to Re: Difference in the tablespace folders on primary and secondary nodes  (Abhishek Bhola <abhishek.bhola@japannext.co.jp>)
List pgsql-general
Greetings,

On Wed, Jul 26, 2023 at 21:31 Abhishek Bhola <abhishek.bhola@japannext.co.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

pgsql-general by date:

Previous
From: Abhishek Bhola
Date:
Subject: Re: Difference in the tablespace folders on primary and secondary nodes
Next
From: David Rowley
Date:
Subject: Re: How to improve the performance of my SQL query?