Skip to content

Commit ec46893

Browse files
Merge pull request #158 from doctolib/handle_null_xact_start
Handle cases when the blocking query xact_start is null (for logging)
2 parents 9b1173d + bc15744 commit ec46893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/safe-pg-migrations/helpers/blocking_activity_formatter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def output_confidentially_blocking_queries(queries)
4141
queries.each do |start_time, locktype, mode, pid, transactionid|
4242
Logger.say <<~MESSAGE.squish, sub_item: true, sensitive: true
4343
Query with pid #{pid || 'null'}
44-
started #{format_start_time(start_time)}:
44+
started #{start_time ? format_start_time(start_time) : 'unknown'}:
4545
lock type: #{locktype || 'null'},
4646
lock mode: #{mode || 'null'},
4747
lock transactionid: #{transactionid || 'null'}",

0 commit comments

Comments
 (0)