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 1o3If5-0006rS-Rn for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jun 2022 14:45: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 1o3If2-0004Pz-ST for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jun 2022 14:45:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o3If2-0004Pp-Jd for pgsql-hackers@lists.postgresql.org; Mon, 20 Jun 2022 14:45:52 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o3Iex-0002fS-BK for pgsql-hackers@postgresql.org; Mon, 20 Jun 2022 14:45:51 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 29C303200929; Mon, 20 Jun 2022 10:45:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 20 Jun 2022 10:45:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1655736344; x=1655822744; bh=/ l90SRDr5lZMobtJC1MgcsO6SHT2Mqi4DpnbygotezM=; b=LK3aFtPDBemlGadRI Qd3xJhDgp2DaF6C4H69ilpxm1XQHzheXAW59Aph8HLw58a4PsqmGBWFIe8BecRWT onxhMNu4kdK69jD1gbIBRAy3PG77+rKc5O56NIVZMP6P3o5uUiPV+bpHPMNW2ksG 7f0XfYNElSlsDzBFnOqUSiGPA5EKWfIzdK5YBxasDJ+NU8ZX4pYN17s9K4zb+vAb 5AHDNGy7XrCUpWX1L4HJsLi2Z9B9VTiGJ+7wW4kzQEDWGxaMlVbYd8vUiJtbOTxL YMvcVapc+lzeK6Sb3FpFvQ9BG9JvFqL2SOmVJjw5k/TOolsHYT9BTAXE/mLC46jz 52jZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefuddgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Jun 2022 10:45:43 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E97C3352; Mon, 20 Jun 2022 13:05:14 +0200 (CEST) Date: Mon, 20 Jun 2022 13:05:14 +0200 From: Alvaro Herrera To: David Fetter Cc: Tom Lane , Robert Haas , PostgreSQL Development Subject: Re: Finer grain log timestamps Message-ID: <20220620110514.athzygshxtln3yt6@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220614000545.GE12494@fetter.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Jun-14, David Fetter wrote: > On Mon, Jun 13, 2022 at 04:22:42PM -0400, Tom Lane wrote: > > A different line of thought is to extend %t to provide a precision > > field a la sprintf, so that for example "%.3t" is equivalent to > > "%m" and "%.6t" does what David wants, and we won't have to > > search for a new escape letter when the day arrives that > > somebody wants nanosecond resolution. The same could be done > > with %n, avoiding the need to find a different escape letter > > for that. > > I'll build this more sprintf-like thing if not doing so prevents the > change from happening, but frankly, I don't really see a point in it > because the next "log timestamps at some random negative power of 10 > second granularity" requirement I see will be the first. Do we *have* to provide support for arbitrary numbers of digits, though? We could provide support for only %.3t and %.6t specifically, and not worry about other cases (error: width not supported). When somebody wants %.9t in ten years, we won't have to fight for which letter to pick. And I agree that widening %m for everybody without recourse is not great. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/