Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8df9bd0

Browse files
committed
Change logical replication pg_hba.conf use
Logical replication no longer uses the "replication" keyword. It justmatches database entries in the normal way. The "replication" keywordnow only applies to physical replication.Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
1 parent4cfc948 commit8df9bd0

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

‎doc/src/sgml/client-auth.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
193193
members of the role, directly or indirectly, and not just by
194194
virtue of being a superuser.
195195
The value <literal>replication</> specifies that the record
196-
matches if a replication connection is requested (note that
196+
matches if aphysicalreplication connection is requested (note that
197197
replication connections do not specify any particular database).
198198
Otherwise, this is the name of
199199
a specific <productname>PostgreSQL</productname> database.

‎doc/src/sgml/logical-replication.sgml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,9 @@
295295
<title>Security</title>
296296

297297
<para>
298-
Logical replication connections occur in the same way as with physical streaming
299-
replication. It requires access to be explicitly given using
300-
<filename>pg_hba.conf</filename>. The role used for the replication
301-
connection must have the <literal>REPLICATION</literal> attribute. This
302-
gives a role access to both logical and physical replication.
298+
The role used for the replication connection must have
299+
the <literal>REPLICATION</literal> attribute. Access for the role must be
300+
configured in <filename>pg_hba.conf</filename>.
303301
</para>
304302

305303
<para>

‎src/backend/libpq/hba.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,9 @@ check_db(const char *dbname, const char *role, Oid roleid, List *tokens)
612612
foreach(cell,tokens)
613613
{
614614
tok=lfirst(cell);
615-
if (am_walsender)
615+
if (am_walsender&& !am_db_walsender)
616616
{
617-
/* walsender connections can only match replication keyword */
617+
/*physical replicationwalsender connections can only match replication keyword */
618618
if (token_is_keyword(tok,"replication"))
619619
return true;
620620
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp