[snip]
So there will be an inconsistency in the data between the current Primary ( promoted standby) and my recovered /repaired old server ( which was primary before the crash).
How to handle this data inconsistency or what best mechanism needs to be implemented if you were me in this use case scenario?
Before promoting Secondary to New Primary, I'd record it's current pg_stat_replication.replay_lsn value somewhere and then compare it to the relevant LSN on Old Primary when it comes back up.
If they're the same, then there's no data inconsistency.
If there is, then you've got to manually check tables, since every application and database structure is different
--
Angular momentum makes the world go 'round.
Angular momentum makes the world go 'round.