Re: How to log 'user time' in postgres logs

2019-08-29 Thread Adrian Klaver
On 8/28/19 11:36 AM, francis picabia wrote: The other possibility was it just didn't log the slower times, but I have seen larger numbers in the 10,000 ms range in the night when some backups and housekeeping happens. All  log related settings: checkpoint_segments = 12 logging_collector

Re: How to log 'user time' in postgres logs

2019-08-29 Thread Adrian Klaver
On 8/28/19 11:36 AM, francis picabia wrote: The server was running Moodle.  The slow load time was noticed when loading a quiz containing multiple images.  All Apache log results showed a 6 seconds or a multiple of 6 for how long it took to retrieve each image. Interestingly, if I did a wget

Re: How to log 'user time' in postgres logs

2019-08-29 Thread francis picabia
On Wed, Aug 28, 2019 at 4:51 PM Tom Lane wrote: > francis picabia writes: > > The server was running Moodle. The slow load time was noticed when > loading > > a quiz containing > > multiple images. All Apache log results showed a 6 seconds or a multiple > > of 6 for how long > > it took to ret

Re: How to log 'user time' in postgres logs

2019-08-28 Thread Tom Lane
francis picabia writes: > The server was running Moodle. The slow load time was noticed when loading > a quiz containing > multiple images. All Apache log results showed a 6 seconds or a multiple > of 6 for how long > it took to retrieve each image. > Interestingly, if I did a wget, on the serv

Re: How to log 'user time' in postgres logs

2019-08-28 Thread francis picabia
The server was running Moodle. The slow load time was noticed when loading a quiz containing multiple images. All Apache log results showed a 6 seconds or a multiple of 6 for how long it took to retrieve each image. Interestingly, if I did a wget, on the server, to the image link (which was proc

Re: How to log 'user time' in postgres logs

2019-08-28 Thread Tom Lane
Adrian Klaver writes: > On 8/28/19 5:36 AM, francis picabia wrote: >> I had no clue the database was the issue because I >> had the minimal >> log_duration = on >> log_line_prefix = '<%t>' >> With those settings all queries seen were roughly 1ms >> >> I need this log to show the true time it take

Re: How to log 'user time' in postgres logs

2019-08-28 Thread Adrian Klaver
On 8/28/19 5:36 AM, francis picabia wrote: Recently had a problem where autovacuum was accidentally left off and the database took 6 seconds for every task from PHP. I had no clue the database was the issue because I had the minimal log_duration = on log_line_prefix = '<%t>' With those setting