Home > Software design >  How to turn on track_commit_timestamp in psql
How to turn on track_commit_timestamp in psql

Time:10-25

https://www.postgresql.org/docs/current/runtime-config-replication.html#GUC-TRACK-COMMIT-TIMESTAMP

track_commit_timestamp (boolean) Record commit time of transactions.
This parameter can only be set in postgresql.conf file or on the server command line. The default value is off.

show track_commit_timestamp; return off.
How to turn on in psql?

CodePudding user response:

You can use ALTER SYSTEM as a superuser:

ALTER SYSTEM SET track_commit_timestamp = on;
-- tell PostgreSQL you modified the configuration
SELECT pg_reload_conf();

This is equivalent to changing postgresql.conf and reloading with pg_ctl reload.

  • Related