Question about postgresql timeline and point in time recovery

the problem:

i’m running timescale ha single helm chart on 3 node k8s cluster with backup enabled(wal archiving to S3 bucket as well). each time a master is switched, and replica is promoted to master, a new timline is created(local on pgwal dir and on the backup repoository you can see the .history file with the timeline swtich information). now lets say i already have timelines: 1…5.
so now the master is on timeline 5.
if i try to do a Point In Time Recovery from master to a specific time in timline 3, i see that postgres is createting timeline 4(which already exist from before), and not timeline 6
after that i get wal file conflicts, as i have new wal files and old wal file for timeline 4.
in this case the backup stops working.

does anyone know, why postgres do not create timeline id with the highest number(which will resolve the problem), and instead he is creating timeline ++1 from the timeline id that i try to recover ?

TimescaleDB version:
PostgreSQL version:
pg 14.11
Other software:
using timescale ha image
Install method:

Hi @zivy, I cannot help too much to resolve your issue, but, please, make a plan to move out of archived helm chart. Try to find out other solutions in the community like Zalando Postgresql operator or StackGres. Both operator will offer you a much robust support. We already updated our official docs offering this solutions instead of our old helm-charts.

1 Like