The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/10/auth-pg-hba-conf.html Description:
I've been setting up logical replication today and I had a lot of trouble getting it to work. The main issue I ran into was that I mistakenly had the database set to "replication," thinking that logical replication required that keyword the same way physical replication does. When you do this, and then try to create a subscription, you get an error like: ERROR: could not connect to the publisher: FATAL: no pg_hba.conf entry for replication connection from host "73.71.60.29", user "testreplicator", SSL on FATAL: no pg_hba.conf entry for replication connection from host "73.71.60.29", user "testreplicator", SSL off Hm. Somehow you can't connect. Well, it's because you are trying to do logical replication and the only connection config you have is for physical replication. The error message isn't great, and so I burned a good bit of time trying to figure out what the heck was going on. Anyway, I suggest a quick change to add emphasis about how the replication keyword should not be used for logical replication. That'd have saved me. In a really wonderful world, we could also: - Update the pg_hba.conf file to make a note about this, and - Improve the error message above somehow to indicate that it only sees physical replication slots or something like that (I'm not sure what's possible here.) I hope this helps, and thank you for all the rest of the wonderful documentation.