Log PostgreSQL version number on startup
authorPeter Eisentraut <[email protected]>
Wed, 30 Jan 2019 22:26:10 +0000 (23:26 +0100)
committerPeter Eisentraut <[email protected]>
Wed, 30 Jan 2019 22:26:10 +0000 (23:26 +0100)
Logging the PostgreSQL version on startup is useful for two reasons:
There is a clear marker in the log file that a new postmaster is
beginning, and it's useful for tracking the server version across
startup while upgrading.

Author: Christoph Berg <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/20181121144611[email protected]/

src/backend/postmaster/postmaster.c

index 119c01d7452f731c6ebc0accce342efe5ce6c05b..40a0222220d091c2554a35e1d9efb34b20236e9d 100644 (file)
@@ -1052,6 +1052,10 @@ PostmasterMain(int argc, char *argv[])
 
    whereToSendOutput = DestNone;
 
+   /* Report server startup in log */
+   ereport(LOG,
+           (errmsg("starting %s", PG_VERSION_STR)));
+
    /*
     * Establish input sockets.
     *