pgbadger incremental mode via SSH

pgbadger is a great tool, and quite frankly I suggest everyone I talk to about PostgreSQL to install it!
Why?
It is cheap and does its job in analyzing logs and providing you insights about what happened in your cluster.

A few days ago I caught a strange, to me, behavior. pgbadger has a very handy incremental mode that allows you to keep it running processing new logs every day (or whatever period you choose) and get historical and up-to-date insights. Well, when downloading a file over an SSH connection, this incremental behavior was not working.
Uhm, I was sure it was working, since I use it quite often, but I was unable to understand what I was missing in the configuration of pgbadger. After a few experiments and comparisons with other working systems of mines, I found that the -r (remote) flag was able to work over SSH, while a “simple” URI like ssh://me@you//var/postgresql/logs was not.

I reported the issue, and in less than a week the problem was fixed!
Well, this is unfair: it is true that the commits is a week after the initial issue, but after only 48 hours there was a commit aimed to fix the problem, but then there was some around-the-daylight time spent in communicating tests and their results.

This is something you simply don’t get in your commercial ecosystem!

Thanks for the great work and keep this useful project going!

The article pgbadger incremental mode via SSH has been posted by Luca Ferrari on April 6, 2022