pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: when the startup process doesn't (logging startup delays)
Date: Mon, 27 Sep 2021 08:32:44 -0500
Message-ID: <20210927133244.GC831@telsasoft.com> (raw)
In-Reply-To: <CAMm1aWbZvHuodydSeV5=K8iuF_Qf+OaY9zFBzNAb3-B5umjWng@mail.gmail.com>
References: <CAMm1aWZrnYp1WocvoXcR2W2CGuqhgO+UjA9yz29kT6j1Axe=-w@mail.gmail.com>
	<CAMm1aWY6E+S2Q93yqvWGukZZ1SDR1tjEr_UAjeVFCqvqiQqseg@mail.gmail.com>
	<20210904022327.GE26465@telsasoft.com>
	<YTb4cDKWaAKfoTMM@paquier.xyz>
	<CAMm1aWbV6_7d3-J0RLKWMysB4fdjgTN_0zynav9Fi+tKepe2Hw@mail.gmail.com>
	<20210907114903.GJ26465@telsasoft.com>
	<CAMm1aWaVvuj6cvm0dNxfsN_EpmhE0n2vYud3pcPV75fc+JMCdg@mail.gmail.com>
	<CAMm1aWZqQNdjawULasOPr0Kt0JaweRoDF2W1353O7VUraxisVA@mail.gmail.com>
	<CA+TgmoZPy4rbozrHRXuJpwnoWqyA=ukrwZRZ5nJF2K8466-eBQ@mail.gmail.com>
	<CAMm1aWbZvHuodydSeV5=K8iuF_Qf+OaY9zFBzNAb3-B5umjWng@mail.gmail.com>

On Mon, Sep 27, 2021 at 04:57:20PM +0530, Nitin Jadhav wrote:
> > It is also not logical to define 0 as meaning that "all messages for
> > such operations are logged". What does that even mean? It makes sense
> > for something like log_autovacuum_min_duration, because there we are
> > talking about logging one message per operation, and we could log
> > messages for all operations or just some of them. Here we are talking
> > about the time between one message and the next, so talking about "all
> > messages" does not really seem to make a lot of sense. Experimentally,
> > what 0 actually does is cause the system to spam log lines in a tight
> > loop, which cannot be what anyone wants. I think you should make 0
> > mean disabled, and a positive value mean log at that interval, and
> > disallow -1 altogether.
> 
> Made changes which indicate 0 mean disabled, > 0 mean interval in
> millisecond and removed -1.
> 
> Please find the patch attached.

I think you misunderstood - Robert was saying that interval=0 doesn't work, not
suggesting that you write more documentation about it.

Also, I agree with Robert that the documentation is too verbose.  I don't think
you need to talk about what happens if the clock goes backwards (It just needs
to behave conveniently).

Look at the other _duration statements for what they say about units.
"If this value is specified without units, it is taken as milliseconds."
https://www.postgresql.org/docs/14/runtime-config-logging.html
 log_autovacuum_min_duration
 log_min_duration_statement

>>It also looks pretty silly to say that if you set the value to 10s, something
>>will happen every 10s. What else would anyone expect to happen?

@Robert: that's consistent with existing documentation, even though it might
seem obvious and silly to us.

| For example, if you set this to 250ms then all automatic vacuums and analyzes that run 250ms or longer will be logged
| For example, if you set it to 250ms then all SQL statements that run 250ms or longer will be logged

-- 
Justin





view thread (105+ messages)  latest in thread

Message-ID: <20210927133244.GC831@telsasoft.com>
Permalink:  ../20210927133244.GC831@telsasoft.com/
Also on:    postgresql.org/message-id/20210927133244.GC831@telsasoft.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, nitinjadhavpostgres@gmail.com, robertmhaas@gmail.com, michael@paquier.xyz, bharath.rupireddyforpostgres@gmail.com, tgl@sss.pgh.pa.us, andres@anarazel.de, sfrost@snowman.net, magnus@hagander.net, thomas.munro@gmail.com
  Subject: Re: when the startup process doesn't (logging startup delays)
  In-Reply-To: <20210927133244.GC831@telsasoft.com>

* 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