Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gPVQv-0005Nb-LG for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Nov 2018 16:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gPVQt-0006ll-Ts for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Nov 2018 16:32:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gPVQt-0006la-JB for pgsql-hackers@lists.postgresql.org; Wed, 21 Nov 2018 16:32:55 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gPVQl-0006qK-R7 for pgsql-hackers@postgresql.org; Wed, 21 Nov 2018 16:32:54 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 12FB55F79C; Wed, 21 Nov 2018 11:32:47 -0500 (EST) Date: Wed, 21 Nov 2018 11:32:46 -0500 From: Stephen Frost To: Christoph Berg , PostgreSQL Hackers Subject: Re: [PATCH] Log PostgreSQL version number on startup Message-ID: <20181121163246.GR3415@tamriel.snowman.net> References: <20181121144611.GJ15795@msg.credativ.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RDZKVD6KUognMRfE" Content-Disposition: inline In-Reply-To: <20181121144611.GJ15795@msg.credativ.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --RDZKVD6KUognMRfE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Christoph Berg (christoph.berg@credativ.de) wrote: > it has bugged me for a long time that there's no clear "PostgreSQL is > starting" message in the server log file. I'd like to change that for > two reasons: +1 > * when reading a long log file, it's not entirely clear where a new > server startup begins. >=20 > It was worse in the past (first message was "database system was > shut down at..." which rather looks like a shutdown message to > newbie users), now it's "listening on IPv6..." but that message > might possibly become DEBUG1, or listen_addresses might become > changeable at run-time >=20 > * while upgrading servers, it's useful to know which server version > was actually started if there are several startup attempts >=20 > The change would be to log "Starting PG_VERSION_STR" as early as > possible. >=20 > A startup looks like this: >=20 > 2018-11-21 15:19:47.259 CET [24453] LOG: listening on IPv6 address "::1"= , port 5431 > 2018-11-21 15:19:47.259 CET [24453] LOG: listening on IPv4 address "127.= 0.0.1", port 5431 > 2018-11-21 15:19:47.315 CET [24453] LOG: listening on Unix socket "/tmp/= =2Es.PGSQL.5431" > 2018-11-21 15:19:47.394 CET [24453] LOG: starting PostgreSQL 12devel on = x86_64-pc-linux-gnu, compiled by gcc (Debian 8.2.0-9) 8.2.0, 64-bit > 2018-11-21 15:19:47.426 CET [24454] LOG: database system was shut down a= t 2018-11-21 15:15:35 CET > 2018-11-21 15:19:47.460 CET [24453] LOG: database system is ready to acc= ept connections >=20 > (I'd rather put the start message before the listening messages, but I > think the startup message should be logged via logging_collector, and > listening is logged before the log file is opened.) I wonder if maybe we should do both (though with an appropriate "logs now being logged through the logging collector" or some such). I've not really looked at the patch at all, but definitely like the idea. Thanks! Stephen --RDZKVD6KUognMRfE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJb9YiuAAoJEO1sijiDR2RVqscP/jMp99qIc7b8ug+s6ZLGXlVQ 0ZKQ7HevWx+k+nVxB00IoR06hZoofQWX5gwCkE9gdqqxa9VyEQDwZaQWt9e/rkyC /HAjr9/lgvcFmt0gmCiMYz+57dxvrJ9Wz11J+rwkg1foPbxz1dPmhch5nd9gqNTE kP39hmJFP06F5nTKP6o9n/APBH3A7p3X8mnnhR25MbOwInGr2ShfPeg4P5tIJv0f tGe3DHSk1aArHXHBihk2gAZ1s9qZ7E+lpk1e9DA64Z0lUHRmrkXFzgsTcMbgyC31 K7CB10CWGCp9ACn3VKXkf2EW/EgY7ja7NjYvwdCbPowWVMWwAROxlKStF+lVw6+v fTP3w+9o9vYq9jibWoz/EtArZhlahpnlMbTjB8vSG3mSSEpgZExcdaKDX43r7Adr eLoN12V76or2d9DTcLqa1cEKADuNuhcULt9Uc3d/DZiIzUNZRmoJGwZEYndW6zTK HYZs5lOkeu3wc2NTd+FTLI/nfydXWzsklrhn+jl0YxA72bZeibOSqKCj+/cdr3oE VejmF4mRB8V+GvaXl5Gn6xIy4xq0TIo6JowNfbhDwnvHL28xdqZxvwB7pdYfaNKU 3pEQoLLAwLPJSXsDNKIKK86Hs6J/uXy0XJD1nAJI/YeQbWBwjuFaJPaY3nXIch0b /PRVSShhnlfhuxFgQ/Yu =B7IO -----END PGP SIGNATURE----- --RDZKVD6KUognMRfE--