Home > Software engineering >  how works commit timestamp internally
how works commit timestamp internally

Time:06-28

those files are present in folder /pg_commit_ts

-rw-------.  1 postgres postgres 262144 Jun 17 12:56 0000
-rw-------.  1 postgres postgres 262144 Jun 17 12:56 0001
-rw-------.  1 postgres postgres 262144 Jun 17 12:57 0002
...

Are thoses files created only if track_commit_timestamp is on?

CodePudding user response:

Yes, these files are only created if track_commit_timestamp = on. You cannot get the last committed statement, but you can use pg_last_committed_xact() to get the timestamp and transaction ID of the last committed transaction (see the documentation).

  • Related