mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +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:
parent
4cfc9484d4
commit
8df9bd0b44
@ -193,7 +193,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
|
||||
members of the role, directly or indirectly, and not just by
|
||||
virtue of being a superuser.
|
||||
The value <literal>replication</> specifies that the record
|
||||
matches if a replication connection is requested (note that
|
||||
matches if a physical replication connection is requested (note that
|
||||
replication connections do not specify any particular database).
|
||||
Otherwise, this is the name of
|
||||
a specific <productname>PostgreSQL</productname> database.
|
||||
|
@ -295,11 +295,9 @@
|
||||
<title>Security</title>
|
||||
|
||||
<para>
|
||||
Logical replication connections occur in the same way as with physical streaming
|
||||
replication. It requires access to be explicitly given using
|
||||
<filename>pg_hba.conf</filename>. The role used for the replication
|
||||
connection must have the <literal>REPLICATION</literal> attribute. This
|
||||
gives a role access to both logical and physical replication.
|
||||
The role used for the replication connection must have
|
||||
the <literal>REPLICATION</literal> attribute. Access for the role must be
|
||||
configured in <filename>pg_hba.conf</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user