This message typically appears during the early stages of your Spring Boot application startup, specifically when a component (like a health check or a basic connectivity test) tries to get some information about the database connection before the full connection pool (like HikariCP) has been completely initialized and made available for introspection.
Here's a breakdown of why you see this:
-
Database version (16.9) is known: This tells you that the application was successful in establishing a basic connection to the PostgreSQL database. It was able to query the database metadata (DatabaseMetaData.getDatabaseProductVersion()) to get the version.
-
Other details are "undefined/unknown":
- Database driver: While the application used the PostgreSQL driver to connect and get the version, the component logging this message might be trying to retrieve the driver name or class from the configuration of the data source or the pool instance, which isn't fully set up or accessible at this precise logging point.
- Autocommit mode & Isolation level: These are connection-specific properties. While a basic connection was made, the logging component might not be querying these from that temporary connection, or it might be expecting to get default values configured on the connection pool, which again isn't fully initialized yet.
- Minimum/Maximum pool size: These are explicit configuration parameters of the connection pool itself (like HikariCP). This log message is almost certainly being generated before the connection pool factory has finished building and configuring the pool instance based on your
application.properties or application.yml settings. Therefore, it cannot report the configured pool sizes because the pool object doesn't exist in its final state yet, or isn't available to the logging code.
In summary:
This is often an informational log message from an early database validation step. It confirms basic connectivity (hence knowing the version) but occurs at a point in the startup lifecycle before the connection pool is fully configured and available for its parameters to be introspected and logged.
What it doesn't mean (usually):
- It does not mean your database connection is misconfigured or won't work.
- It does not mean your pool sizes won't be set correctly (assuming you have them configured or are using defaults).
What happens next:
Later in the startup process, your connection pool (like HikariCP, which is the default in Spring Boot) will be fully initialized using your configuration (or default values), and the application will use this pool for database operations. You should see other log messages from HikariCP itself confirming its initialization and showing the actual pool sizes if you have debug logging enabled for HikariCP.
To verify:
- Look at the log messages immediately after this one. You should see logs from the connection pool library (e.g., "HikariPool-1 - Starting...") that show the pool being built and its final configuration.
- Ensure your application actually starts up successfully and can perform database operations.
Unless you see other errors related to the database connection after this initial log, this message is usually benign and just reflects the state of the application at a specific logging point during startup.