Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a937b071
Commit
a937b071
authored
May 19, 2011
by
Magnus Hagander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add example for replication in pg_hba.conf
Selena Deckelmann
parent
74aaa213
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
src/backend/libpq/pg_hba.conf.sample
src/backend/libpq/pg_hba.conf.sample
+7
-1
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+5
-0
No files found.
src/backend/libpq/pg_hba.conf.sample
View file @
a937b071
...
...
@@ -22,7 +22,9 @@
# plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", "replication", a
# database name, or a comma-separated list thereof.
# database name, or a comma-separated list thereof. The "all"
# keyword does not match "replication". Access to replication
# must be enabled in a separate record (see example below).
#
# USER can be "all", a user name, a group name prefixed with "+", or a
# comma-separated list thereof. In both the DATABASE and USER fields
...
...
@@ -80,3 +82,7 @@
host all all 127.0.0.1/32 @authmethod@
# IPv6 local connections:
host all all ::1/128 @authmethod@
# Allow replication connections from localhost, by a user with the
# replication privilege.
# host replication @default_username@ 127.0.0.1/32 @authmethod@
# host replication @default_username@ ::1/128 @authmethod@
src/bin/initdb/initdb.c
View file @
a937b071
...
...
@@ -1086,6 +1086,11 @@ setup_config(void)
"@authcomment@"
,
strcmp
(
authmethod
,
"trust"
)
?
""
:
AUTHTRUST_WARNING
);
/* Replace username for replication */
conflines
=
replace_token
(
conflines
,
"@default_username@"
,
username
);
snprintf
(
path
,
sizeof
(
path
),
"%s/pg_hba.conf"
,
pg_data
);
writefile
(
path
,
conflines
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment