SYMPTOM
In specific environments, the following message can be seen in Postgres logs:
2017-05-10 19:24:30 UTC [143596]: [1-1] user=,db=,app=,client= LOG: could not create IPv6 socket: Address family not supported by protocol 2017-05-10 19:24:30 UTC [143596]: [2-1] user=,db=,app=,client= LOG: redirecting log output to logging collector process 2017-05-10 19:24:30 UTC [143596]: [3-1] user=,db=,app=,client= HINT: Future log output will appear in directory "pg_log"
RESOLUTION
This message does not cause any issues starting Postgres. It is there to inform you that the IPv6 protocol is not supported on OS/Linux level, and a socket could not be created while starting Postgres.
NOTES
This issue is reproducible only in the environments where IPv6 was forcefully unloaded from the kernel, and most customers should not see this message in Postgres logs. The example below shows how IPv6 can be unloaded when the message above can be reproduced. The steps below are not recommended, and the example shows how IPv6 is disabled from loading in grub.conf ( ipv6.disable=1).
cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet" GRUB_DISABLE_RECOVERY="true"