1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Change logical replication pg_hba.conf use

Logical replication no longer uses the "replication" keyword.  It just
matches database entries in the normal way.  The "replication" keyword
now only applies to physical replication.

Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
This commit is contained in:
Peter Eisentraut
2017-02-13 16:50:29 -05:00
parent 4cfc9484d4
commit 8df9bd0b44
3 changed files with 6 additions and 8 deletions

View File

@ -612,9 +612,9 @@ check_db(const char *dbname, const char *role, Oid roleid, List *tokens)
foreach(cell, tokens)
{
tok = lfirst(cell);
if (am_walsender)
if (am_walsender && !am_db_walsender)
{
/* walsender connections can only match replication keyword */
/* physical replication walsender connections can only match replication keyword */
if (token_is_keyword(tok, "replication"))
return true;
}