loops
loops copied to clipboard
postgres dropping connections from workers with "unterminated quoted string in connection info string"
If you set process name to something containing \0 you will not be able to connect to postgres. Easy to reproduce:
2.0.0-p247 :007 > $0 = "foo bar\0"
=> "foo bar\u0000"
2.0.0-p247 :008 > require 'pg'; PGconn.connect(dbname: "postgres")
PG::ConnectionBad: unterminated quoted string in connection info string
https://github.com/kovyrin/loops/blob/master/lib/loops/worker.rb#L39 — here it is set.