It should be possible to specify a database parameter with the HELLO command.

Right now, when a reconnection occurs, clients communicating over RESP3 have to resend the HELLO command before other commands are executed. If the user happens to be using a database other than 0, he will also have to send the SELECT command. To avoid sending two commands, the database parameter could be added to HELLO.

This feature is needed in my redis client library Boost.Redis, see more in https://github.com/boostorg/redis/issues/123.

Comment From: madolson

Our suggestion so far has been that you should pipeline the two commands together when you connect and validate both responses. Pipelined commands have very limited overhead compared to sending a single single command with additional arguments.

There are various with compatibility with adding a new argument to the HELLO command at this point, since a client or end user would need to configure the Redis version to know if they can send the special hello command that supports the new argument.