Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
maintenance
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 54d13ab3
authored
Sep 04, 2022
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Memahami DB mirror Postgres v12 ke atas
1 parent
0c884c1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
maintenance/__init__.py
maintenance/__init__.py
View file @
54d13ab
...
...
@@ -112,6 +112,13 @@ def pg_port(conf_file):
def
is_mirror
(
pg_conf
):
r
=
Reader
(
pg_conf
)
if
'include_dir'
in
r
:
# Versi 12 - 14
conf_dir
=
os
.
path
.
split
(
pg_conf
)[
0
]
mirror_conf
=
os
.
path
.
join
(
conf_dir
,
r
[
'include_dir'
],
'recovery.conf'
)
if
os
.
path
.
exists
(
mirror_conf
):
return
True
# Versi 9.1 - 11
mirror_conf
=
os
.
path
.
join
(
r
[
'data_directory'
],
'recovery.conf'
)
if
os
.
path
.
exists
(
mirror_conf
):
return
True
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment