debugsqlMinor
postgresql - a local replication entry doesn't work
Viewed 0 times
postgresqllocalentryreplicationdoesnwork
Problem
Maybe it's just too early in the morning, but I can't seem to get pg_basebackup working for a local user. This is part of testing for an hourly backup automated script. I added a line to pg_hba.conf for this and it looks like:
But, this entry causes a FATAL error: no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off. What did I screw up? I'll be changing the user once I get this part working. The pg_basebackup command looks like:
FYI, if I add "-h ", it does work as I do have another pg_hba.conf entry for:
Does local not work for replication entries?
(Using PostgreSQL 9.3)
local replication postgres trustBut, this entry causes a FATAL error: no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off. What did I screw up? I'll be changing the user once I get this part working. The pg_basebackup command looks like:
pg_basebackup -D - -Ft -z -c fast -l hourly.backup > backup_file.gzFYI, if I add "-h ", it does work as I do have another pg_hba.conf entry for:
host replication postgres 10.10.1.129 md5Does local not work for replication entries?
(Using PostgreSQL 9.3)
Solution
The problem is: "localhost" can be UNIX sockets, IPv4 or IPv6. The first rule you passed is for UNIX sockets. Try to add a rule for IPv4 and one for IPv6. It should work then.
Btw, a SIGHUP is enough in case you change pg_hba.conf.
Btw, a SIGHUP is enough in case you change pg_hba.conf.
Context
StackExchange Database Administrators Q#81380, answer score: 2
Revisions (0)
No revisions yet.