Check directory length in pre-flight check for Postgres socket
What does this Merge Request do and why?
If GDK is installed into a directory with a name that is too long, Postgres will fail to start if it's configured to use a Unix socket, as Unix socket paths have fairly small maximum lengths. A deeper technical explanation as to why can be found in the Postgres commit that added the check.
This MR adds a pre-flight check that attempts to create a socket of equivalent length to the Postgres one and fails the pre-flight check if the socket cannot be created due to a path length issue. The check is bypassed if GDK is configured to use TCP.
Merge Request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise Issue to follow-up. -
Documentation added/updated, if needed. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
/cc @ashmckenzie
Closes #1481 (closed)
Edited by Rémy Coutable