Fix pg_hba.conf matching so that replication connections only match records
Tom Lane <tgl@sss.pgh.pa.us>
Fix pg_hba.conf matching so that replication connections only match records with database = replication. The previous coding would allow them to match ordinary records too, but that seems like a recipe for security breaches. Improve the messages associated with no-such-pg_hba.conf entry to report replication connections as such, since that's now a critical aspect of whether the connection matches. Make some cursory improvements in the related documentation, too.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/client-auth.sgml | modified | +10 −8 |
| doc/src/sgml/high-availability.sgml | modified | +21 −24 |
| doc/src/sgml/recovery-config.sgml | modified | +27 −18 |
| src/backend/libpq/auth.c | modified | +75 −30 |
| src/backend/libpq/hba.c | modified | +11 −6 |
| src/backend/replication/libpqwalreceiver/libpqwalreceiver.c | modified | +2 −2 |