Hi
In the context of Patroni, TL stands for Timeline. It is a unique identifier for a particular point in the replication history of a PostgreSQL cluster. The timeline ID is used to determine which WAL files are needed for a particular server to catch up with the rest of the cluster
We can’t change it.
It tells us that there were 10 times switchovers/failovers happened before.
After every recovery and promotion happens, PostgreSQL starts a new incarnation (New Timeline) to avoid conflict with the previous one.
You may use the following SQL statement to check the current Time-Line of PostgreSQL
@parttime actually, you can change it, but it should be done on a database instance level, not on Patroni, as TimeLine is DB instance attribute. This can be accomplished in a number of ways, the basic idea being to rebuild the entire cluster and instances from scratch:
remove the cluster information from DCS: {{patronictl remove}}
create dump of the data stored in the database (pg_dump) and backup
stop patroni on all nodes
physically remove database instances
initialize database instance on one of the nodes (initdb). After that you will have timeline = 0
load the data to the database using the dump created earlier
start Patroni on the node with the reinitilized database
make sure there are no issues and the node is identified as Leader (patronictl list)
start Patroni on other nodes. Probably, after that you’ll need to reiniitialize the databases on them (patronictl reinit)
In general, the whole idea seems pointless, because, as already written in the comments, after the first switchover/failover the counter will increase by 1. So after 2 switchover/failover TL will already be 2.