Prevent flip-flop of standby_horizon by ignoring 0 LSN and resetting it after each GC iteration

This commit is contained in:
Konstantin Knizhnik
2024-01-30 11:10:40 +02:00
parent 22a0a6ba0c
commit f24b898bef
13 changed files with 104 additions and 39 deletions

View File

@@ -119,11 +119,6 @@ pub fn generate_pg_control(
// Generate new pg_control needed for bootstrap
checkpoint.redo = normalize_lsn(lsn, WAL_SEGMENT_SIZE).0;
//reset some fields we don't want to preserve
//TODO Check this.
//We may need to determine the value from twophase data.
checkpoint.oldestActiveXid = 0;
//save new values in pg_control
pg_control.checkPoint = 0;
pg_control.checkPointCopy = checkpoint;