Skip to content

Instantly share code, notes, and snippets.

@vladpurga
Created September 6, 2019 05:51
Show Gist options
  • Save vladpurga/670f62d63e79d92809d3ca5add6a7c35 to your computer and use it in GitHub Desktop.
Save vladpurga/670f62d63e79d92809d3ca5add6a7c35 to your computer and use it in GitHub Desktop.

Revisions

  1. vladpurga revised this gist Sep 6, 2019. No changes.
  2. vladpurga created this gist Sep 6, 2019.
    14 changes: 14 additions & 0 deletions postgresql-log-line-prefix.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    `log_line_prefix = '%m (%p:%h:%d:%u:%a:%v:%x) '`

    `2019-08-16 05:08:57.939 GMT (62842:host:database:user:[application]:16/36976788:3643551317) LOG: process 62842 still waiting for ExclusiveLock on tuple (113892,1) of relation 14028231 of database 12345 after 1000.098 ms`

    ```
    %p = 62842
    %v = 16/36976788
    %x = 3643551317
    # special values:
    # %p = process ID
    # %v = virtual transaction ID
    # %x = transaction ID (0 if none)
    ```