I have patroni/postgresql cluster. when I rebooted leader node in patroni cluster, It has timeline differences after boot

pg_rewind command needs wal_log_hints parameter and so I have configured wal_log_hints=on parameter on cluster-wide. Then tested again with reboot

But pg_rewind command still complains about wal_log_hints

$pg_rewind --target-pgdata=/var/lib/postgresql/14/main --source-server="host= port=5433 user=postgres"
pg_rewind: fatal: target server needs to use either data checksums or "wal_log_hints = on"

So when I check this paramter on leader node I mean, it is already configured as on postgres@pat02:~

$ psql -p 5433 -U postgres -h localhost -c "select name, setting, applied, error from pg_file_settings where name like 'wal_log%';"
     name      | setting | applied | error 
 wal_log_hints | on      | t       | 
(1 row)

So how can I use pg_rewind ? To recover timeline issue with patroni reinit command is painfull


  • 1
    wal_log_hints should have been enabled in the past. At least before the last checkpoint before the point of divergence.
    – Melkij
    Mar 29, 2022 at 12:13
  • @Melkij I configured wal_log_hints in the past. So I restarted all 3 nodes to apply wal_log_hints configuration and then tested Before the test there is no timeline issue, after test (rebooted leader node) timeline issue occured again Mar 29, 2022 at 13:55
  • If pg_rewind complains, you did not have wal_log_hints enabled from the time where the instances diverged. Mar 29, 2022 at 14:32
  • Hello @LaurenzAlbe I did not understand you clearly. My process was like below I configured wal_log_hints to on I restarted all the patroni nodes I checked wal_log_hints parameter in nodes that is ok Then tested problem with rebooting the leader node Mar 30, 2022 at 6:47
  • That is hard to believe. Mar 30, 2022 at 12:18


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.