New connection detail fields in Heroku Postgres logs

Change effective on 19 May 2022

The Heroku Postgres logs now include extra fields that provide more information and context about their specific process/connection. These new fields are:

  • pid: Process ID
  • log_line: Number of the log line for each session or process, starting at 1
  • proc_start_time: Time when the process started
  • user: Username
  • database: Database name
  • connection_source: IP address and port of the connection source
  • application_name: Application name set for the connection
  • time_ms: Time stamp with milliseconds when the log line was logged by PostgreSQL
  • session_id: Session ID
  • vtid: Virtual transaction ID
  • tid: Transaction ID

Previously, log lines only included explicit fields for sql_error_code.

This change will be rolled out to all Heroku Postgres databases running on production plans when they are updated as part of regular maintenance. To manually apply this change, customers can also schedule and run a new maintenance on their Heroku Postgres databases using the Data Maintenance CLI Plugin.