diff --git a/pkg/cli/cliflags/flags.go b/pkg/cli/cliflags/flags.go index aa9879c3d1ae..1b2fbf157de5 100644 --- a/pkg/cli/cliflags/flags.go +++ b/pkg/cli/cliflags/flags.go @@ -571,28 +571,29 @@ write its process ID to the specified file.`, } Socket = FlagInfo{ - Name: "socket", - EnvVar: "COCKROACH_SOCKET", + Name: "socket", + EnvVar: "COCKROACH_SOCKET", + Description: `Deprecated in favor of --socket-dir.`, + } + + SocketDir = FlagInfo{ + Name: "socket-dir", + EnvVar: "COCKROACH_SOCKET_DIR", Description: ` -Accept client connections using a Unix domain socket with the -given name. +Accept client connections using a Unix domain socket created +in the specified directory. Note: for compatibility with PostgreSQL clients and drivers, -ensure that the socket name has the form "/path/to/.s.PGSQL.NNNN", -where NNNN is a number. PostgreSQL clients only take a port -number and directory as input and construct the socket name -programmatically. +the generated socket name has the form "/path/to/.s.PGSQL.NNNN", +where NNNN is the port number configured via --listen-addr. + +PostgreSQL clients only take a port number and directory as input +and construct the socket name programmatically. To use, for example: psql -h /path/to -p NNNN ... `, } - SocketDir = FlagInfo{ - Name: "socket-dir", - EnvVar: "COCKROACH_SOCKET_DIR", - Description: `Deprecated in favor of --socket-dir.`, - } - ClientInsecure = FlagInfo{ Name: "insecure", EnvVar: "COCKROACH_INSECURE",