I am trying to add code to determine whether the transaction is checkpointed or not. So I think I need to compare the transaction ID with the checkpoint's and determine whether it is older or not. Could anyone tell me what's the best practice of doing this in Postgres? Is it done somewhere in the existing code?