Re: Monitoring for long running transactions

2020-06-04 Thread Thomas Kellerer
Samuel Smith schrieb am 04.06.2020 um 21:59: Sorry, I should have clarified that I was aware of the pg_stat_activity table. That is how we found the problem in the first place. And yes I could just write a bash script and run it in cron. I just didn't know if there was a more "official" way to go

Re: Monitoring for long running transactions

2020-06-04 Thread Christoph Moench-Tegeder
## Samuel Smith (pg...@net153.net): > Sorry, I should have clarified that I was aware of the pg_stat_activity > table. That is how we found the problem in the first place. And yes I > could just write a bash script and run it in cron. I just didn't know if > there was a more "official" way to g

Re: Monitoring for long running transactions

2020-06-04 Thread Adrian Klaver
On 6/4/20 12:59 PM, Samuel Smith wrote: On 6/4/20 2:29 PM, Adrian Klaver wrote: Sorry, I should have clarified that I was aware of the pg_stat_activity table. That is how we found the problem in the first place. And yes I could just write a bash script and run it in cron. I just didn't k

Re: Monitoring for long running transactions

2020-06-04 Thread Samuel Smith
On 6/4/20 2:29 PM, Adrian Klaver wrote: On 6/4/20 10:00 AM, Samuel Smith wrote: We had a customer complaining of random data loss for the last 6 months or so. We eventually tracked it down to a combination of bad coding and a couple of bugs with the ORM. Basically, 'BEGIN' was being emitted by

Re: Monitoring for long running transactions

2020-06-04 Thread Adrian Klaver
On 6/4/20 10:00 AM, Samuel Smith wrote: We had a customer complaining of random data loss for the last 6 months or so. We eventually tracked it down to a combination of bad coding and a couple of bugs with the ORM. Basically, 'BEGIN' was being emitted by the web app when viewing a certain page

Monitoring for long running transactions

2020-06-04 Thread Samuel Smith
We had a customer complaining of random data loss for the last 6 months or so. We eventually tracked it down to a combination of bad coding and a couple of bugs with the ORM. Basically, 'BEGIN' was being emitted by the web app when viewing a certain page and 'COMMIT' was never emitted after tha