In Tracking long-running postgresql queries we learned how to extract long queries.
The technique used means that a long query will be printed repeatedly, but we are only interested in the last report.
I used ChatGPT to ask for what I wanted and it provided the following script.
1 |
|
The results:
1 | PID: 2081628, Age: 00:10:49 |