pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: francis picabia <fpicabia@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: How to log 'user time' in postgres logs
Date: Wed, 28 Aug 2019 10:28:51 -0400
Message-ID: <9124.1567002531@sss.pgh.pa.us> (raw)
In-Reply-To: <94ac4f4a-452e-02cd-a91c-4db3afbd4a2b@aklaver.com>
References: <CA+AKB6Gwbfjc3LgMDYTRRfgeWC_m=q8Gstw8=oX6bSOX3TeDaQ@mail.gmail.com>
	<94ac4f4a-452e-02cd-a91c-4db3afbd4a2b@aklaver.com>

Adrian Klaver <adrian.klaver@aklaver.com> 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 takes to get a result back.

> I'm having a hard time believing autovacuum was involved in this, given 
> you say the queries took only 1ms on  average.

Also: the time logged by log_duration IS the time it took, so far as the
server can tell.

Perhaps there's monstrous network delays involved, but what I'm suspicious
of is inefficient client-side processing.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <9124.1567002531@sss.pgh.pa.us>
Permalink:  ../9124.1567002531@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9124.1567002531@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, fpicabia@gmail.com
  Subject: Re: How to log 'user time' in postgres logs
  In-Reply-To: <9124.1567002531@sss.pgh.pa.us>
  References: <CA+AKB6Gwbfjc3LgMDYTRRfgeWC_m=q8Gstw8=oX6bSOX3TeDaQ@mail.gmail.com> <94ac4f4a-452e-02cd-a91c-4db3afbd4a2b@aklaver.com> <9124.1567002531@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox