Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUqkZ-0003Qm-2w for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Sep 2021 13:32:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mUqkX-0004pk-FB for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Sep 2021 13:32:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUqkX-0004pb-1l for pgsql-hackers@lists.postgresql.org; Mon, 27 Sep 2021 13:32:53 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mUqkT-0003EZ-BL for pgsql-hackers@postgresql.org; Mon, 27 Sep 2021 13:32:52 +0000 Received: by mail-io1-xd2d.google.com with SMTP id 134so22714669iou.12 for ; Mon, 27 Sep 2021 06:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=c82VccqZWXVY1WFq2uwTAs2jtXL1csr+ILsgt7iGpYE=; b=GO4yw7KUPrFj4iYZOnWD7FoCXc3FIvB1MjdrvCJqXUcmiBWfq4jUOsRb0AgWKmK4qC F72O4scVR87As/xDeMXGfnmtzHRDLu7UV+op0b//erwmU+EV/X2qgX74gIBC3sbfeYuR hbQiJiGPRjkV/kyFbBjRgZIbt+Gx3CfbJNvqNO+aY7ccqxbHOggAAP+IqFHq7ZE7rELI XU9p87DluUIJQSxlHpVYTWyDOf1hXH9ydwBQNOqYsrt9JfsN/v1s4sK+Jln1heVscTRH V42RQTZGzR01siuzaZJyDFgLDsiAujs4Q9/9lN/yduOFxnBPQx1DJY1z9hIQoN6lvvUH 7gPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=c82VccqZWXVY1WFq2uwTAs2jtXL1csr+ILsgt7iGpYE=; b=cBZGUT1Ap2IzNs72/MMUiu2lkIHUQ0MKZYV6/nteWZ4dp6fJFtnKgMSI0Q0uue1nn+ +UImZFR5lQTP8L8KX76PXycX+wfpv1ZQ+YQOqvx8ULEid+nSWeT0Ex/BqYv6cPREZa25 N8i62eMBiJu0hVJ9O8nkYXbCi94n5Ki1w3cvHxFiGF0JY02gy2tNq0Wl87B4TkOOV4CM wtTbNmYrsmSwgoUsq7VKjJ8zgKy8E3yYppTppmQo6lpbZPgTTT6OAW5tqrBO4qgjBaLS auwXIJyrJBekhTtfr87rTOYPbk2rj6AMvK4xqtEXxtDlTXns51vD8d1LF94FoZEYw49g v1CA== X-Gm-Message-State: AOAM5300LoqoW1SheoJV+MmvDcxOQlc0RDF9W2InPV484XfWO/H0dr2r 7tvA1sMCAU13HFp5Mwza1Gyf7w== X-Google-Smtp-Source: ABdhPJxC++7rAFak5nTtHVmKY4c8//olIEK7tIv3oUTeD42+Z3fsUlahIWOz1s9MmZZpLvxbDjkovw== X-Received: by 2002:a02:8804:: with SMTP id r4mr21899703jai.55.1632749567499; Mon, 27 Sep 2021 06:32:47 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id w3sm9019554ilv.47.2021.09.27.06.32.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Sep 2021 06:32:45 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id C5C51800A39; Mon, 27 Sep 2021 08:32:44 -0500 (CDT) Date: Mon, 27 Sep 2021 08:32:44 -0500 From: Justin Pryzby To: Nitin Jadhav Cc: Robert Haas , Michael Paquier , Bharath Rupireddy , Tom Lane , Andres Freund , Stephen Frost , Magnus Hagander , Thomas Munro , pgsql-hackers@postgresql.org Subject: Re: when the startup process doesn't (logging startup delays) Message-ID: <20210927133244.GC831@telsasoft.com> References: <20210904022327.GE26465@telsasoft.com> <20210907114903.GJ26465@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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