I am trying to understand the difference between 2 configurable parameters while creating a connection pool using r2dbc-pool.
I was able to configure the connection pool with the help of the below post: Connection pool size with postgres r2dbc-pool
But wanted to understand the difference while configuring max size and initial size while creating
ConnectionFactory connectionFactory = ConnectionFactories.get(ConnectionFactoryOptions.builder() .option(DRIVER, "pool") .option(PROTOCOL, "postgresql") .option(HOST, host) .option(USER, user) .option(PASSWORD, password) .option(MAX_SIZE, 30) .option(INITIAL_SIZE, 10) .option(DATABASE, database) .build());
ConnectionPoolConfiguration configuration = ConnectionPoolConfiguration.builder(connectionFactory) .maxIdleTime(Duration.ofMinutes(30)) .initialSize(initialSize) .maxSize(maxSize) .initialSize(20) .maxCreateConnectionTime(Duration.ofSeconds(1)) .build();