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 1l7Igk-0005Fg-Ba for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2021 13:59:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7Igi-0005Yr-Lr for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2021 13:59:20 +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 1l7Igh-0005Xz-P9 for pgsql-hackers@lists.postgresql.org; Wed, 03 Feb 2021 13:59:20 +0000 Received: from [66.111.4.25] (helo=out1-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7Igd-0004Gt-03 for pgsql-hackers@lists.postgresql.org; Wed, 03 Feb 2021 13:59:18 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 6764B5C025B; Wed, 3 Feb 2021 08:59:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 03 Feb 2021 08:59:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=R6v6HGalIEqYR0Z08lntqjEgLV9DQiPklIRylf5RS/0=; b=ZAlG3chT sUpqMRRMnDS7saM7Ji9MasxgoN1htHyZ+d36OVYoHKiDvLZpwGfn1nW4ITDN6nRY Ek48XiUGk3Od9xlHDx/s03VcDueEDHLwnGHh4TkovS5if8ys+9Zn5z+nQkeRhndf fiUhVUWzTy4CoN1iebPWTTG9uDS5lfGLXLFSvAKL4MMeTmifj8MvTBHbPsizFm4B 72NEtvi9h/5K8FSMRh+n15XU3u0MeMPvdR1wG77ubp3s6WK6eIWUi53D25JuxfCm 1QQE5ajNhcX+Az22iPHyS8QFm1oXtEf4yjwh8zBVFC5Re2/P/y1JRtiv2BnKG64U dtC5ZSWkezTCMw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgedvgdehjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjfgesthekre dttderudenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepueffhfejieeuue ffgedvudekgeeltdeviedvieeufeeiieevgfetheeufeethedvnecukfhppeduledtrdel hedrudelrddujeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.177]) by mail.messagingengine.com (Postfix) with ESMTPA id 630E81080067; Wed, 3 Feb 2021 08:59:02 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 26B912A0BC0; Wed, 3 Feb 2021 10:58:59 -0300 (-03) Date: Wed, 3 Feb 2021 10:58:59 -0300 From: Alvaro Herrera To: Kyotaro Horiguchi Cc: tsunakawa.takay@fujitsu.com, iwata.aya@fujitsu.com, k.jamison@fujitsu.com, pgsql-hackers@lists.postgresql.org Subject: Re: libpq debug log Message-ID: <20210203135859.GA25472@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210203.111805.1546677784618977625.horikyota.ntt@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-Feb-03, Kyotaro Horiguchi wrote: > Looking the doc mentioned in the comment #39: > > + flags contains flag bits describing the operating mode > + of tracing. If (flags & PQTRACE_OUTPUT_TIMESTAMPS) is > + true, then timestamp is not printed with each message. > > PQTRACE_OUTPUT_TIMESTAMPS is designed to *inhibit* timestamps from > being prepended. If that is actually intended, the symbol name should > be PQTRACE_NOOUTPUT_TIMESTAMP. Otherwise, the doc need to be fixed. I'm pretty sure I named the flag PQTRACE_SUPPRESS_TIMESTAMP (and I prefer SUPPRESS to NOOUTPUT), because the idea is that the timestamp is printed by default. I think that's the sensible decision: applications prefer to have timestamps, even if there's a tiny bit of overhead. We don't want to force them to pass a flag for that. We only want the no-timestamp behavior in order to be able to use it for libpq internal testing. -- Álvaro Herrera 39°49'30"S 73°17'W "Someone said that it is at least an order of magnitude more work to do production software than a prototype. I think he is wrong by at least an order of magnitude." (Brian Kernighan)