pg_hba.conf lines 127.0.0.1 and ::1/128?

What is the meaning of these 2 lines in my pg_hba.conf? I am guessing the first is to allow local connections, but what about the 2nd?

host all all 127.0.0.1/32 trust
host all all ::1/128 trust

1 Answer

Both trust local connections.

127.0.0.1/32 is the typical IPv4 localhost address (although the entire 127.0.0.0/8 is reserved for loopback).

::1/128 is the IPv6 address for loopback; cf section 2.4 of RFC4291.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like