Skip to content

Commit bcf406c

Browse files
author
Daniel Isen
committed
[Backport 2.4][#7651] YSQL: Always listen on UNIX domain socket
Summary: Right now YSQL only listens on the UNIX domain socket depending on the value of ysql_disable_index_backfill gflag. YW depends on YSQL always listening on this for taking YSQL backups when YSQL authentication is enabled. The change needed is to always be listening on a UNIX domain socket regardless of the value of ysql_disable_index_backfill Original revision: D10921 Original commit: 63b3462 Test Plan: Jenkins: rebase: 2.4 Build release, deploy it, enable YSQL auth, connect using local socket, disable index backfill, connect using local socket Reviewers: jason Reviewed By: jason Differential Revision: https://phabricator.dev.yugabyte.com/D11610
1 parent 1ad27c6 commit bcf406c

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

src/yb/yql/pgwrapper/pg_wrapper.cc

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -333,21 +333,16 @@ Status PgWrapper::Start() {
333333
<< EXPR_VALUE_FOR_LOG(conf_.force_disable_log_file) << ": "
334334
<< EXPR_VALUE_FOR_LOG(log_to_file);
335335

336-
// Configure UNIX domain socket.
336+
// Configure UNIX domain socket for index backfill tserver-postgres communication and for
337+
// Yugabyte Platform backups.
337338
argv.push_back("-k");
338-
if (FLAGS_ysql_disable_index_backfill) {
339-
// Disable listening on a UNIX domain socket.
340-
argv.push_back("");
341-
} else {
342-
// Set up a unix domain socket for index backfill tserver-postgres communication.
343-
const std::string& socket_dir = PgDeriveSocketDir(conf_.listen_addresses);
344-
RETURN_NOT_OK(Env::Default()->CreateDirs(socket_dir));
345-
argv.push_back(socket_dir);
339+
const std::string& socket_dir = PgDeriveSocketDir(conf_.listen_addresses);
340+
RETURN_NOT_OK(Env::Default()->CreateDirs(socket_dir));
341+
argv.push_back(socket_dir);
346342

347-
// Also tighten permissions on the socket.
348-
argv.push_back("-c");
349-
argv.push_back("unix_socket_permissions=0700");
350-
}
343+
// Also tighten permissions on the socket.
344+
argv.push_back("-c");
345+
argv.push_back("unix_socket_permissions=0700");
351346

352347
if (log_to_file) {
353348
argv.push_back("-c");

0 commit comments

Comments
 (0)