Re: Logging

From: Andrew Bartley <ambartley(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Logging
Date: 2018-06-13 04:21:38
Message-ID: CAA3RN+zYatze_m=mW-+C6HwTYSuqWiCmq4smirzdLcfCsX2RMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks All,

It seems that the related DETAIL message appears if the query is
successful. On error the DETAIL log line is missing... This makes
debugging difficult, considering the insert is coming from Dreamfactory via
a rest POST.

I am finding it very difficult navigating my way through the brave new
world of SAS and Blackbox type applications.... Maybe 32 years as a
database programmer is just too long.

Thanks

Andrew

On Wed, 13 Jun 2018 at 14:12 Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 06/12/2018 08:25 PM, David G. Johnston wrote:
> > On Tuesday, June 12, 2018, Andrew Bartley <ambartley(at)gmail(dot)com
> > <mailto:ambartley(at)gmail(dot)com>> wrote:
> >
> >
> >
> > On Wed, 13 Jun 2018 at 12:43 Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at
> > <mailto:laurenz(dot)albe(at)cybertec(dot)at>> wrote:
> >
> >
> > log_min_duration_statement = 0
> >
> > [...]
> >
> >
> > log_min_duration_statement -1
> >
> >
> > You've disabled statement logging altogether. The zero value you were
> > directed to use is what causes everything to be logged.
>
> Actually no:
>
>
> https://www.postgresql.org/docs/10/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHEN
>
> log_min_duration_statement (integer)
>
> "... Setting this to zero prints all statement durations. Minus-one (the
> default) disables logging statement durations. ..."
>
> "
>
> So -1 only affects logging statements relative to duration.
>
> If you have log_statements set then you will still get statements logged
> if you have log_min_duration_statement = -1 :
>
> Note
>
> When using this option together with log_statement, the text of
> statements that are logged because of log_statement will not be repeated
> in the duration log message.
> "
>
> This is how I have my logging setup, log_min_duration_statement = -1
> and log_statements = 'mod' and I see statements in the logs.
>
> >
> > David J.
> >
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

  • Re: Logging at 2018-06-13 04:12:51 from Adrian Klaver

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2018-06-13 04:29:51 Re: How can I retrieve double or int data type for libpq
Previous Message Adrian Klaver 2018-06-13 04:12:51 Re: Logging