This post originally appeared on the Annexe.

Getting the following error when trying to start Postgres:

UTC LOG:  invalid IP mask "md5": Name or service not known

Turns out, it’s because I forgot to define the subnet mask for the allowed IP, which meant the security setting was being interpreted. Weird behavior, I would have expected it to search after a backslash.

An example for pg_hba.conf:

host replication postgres 10.0.1.10/24 md5

And an example of my bad one:

host replication postgres 10.0.1.10 md5