In PostgreSQL 9.0, I have a table that keeps tracks of last processed transactions. For some reason, it went backwards (in time)! Here is the table data:
seq_id | tx_id
628 | 10112
629 | 10118
630 | 10124
631 | 10130
632 | 10136
654 | 10160
655 | 10166 <---
656 | 4070 <---
657 | 4071
658 | 4084
659 | 4090
660 | 4096
How can this happen? Can a restart of the database induce such behavior?
Thanks for any hints.
Regards,
D.
This is an invalid issue. Please ignore.
It turns out that the issue came out of restoring the table from a backup and continue working with (invalid) previous data, in a newly created database 🙁
Thanks you for all those who responded already.
Case closed.
Lesson learned: TXID will NOT go backwards and they do get synced to a slave instance if you’re using a Master/Slave setup. TXID rollovers are also correctly handled. Hope this will help others who might be thinking TXID can go backwards!