Commit 54d13ab3 by Owo Sugiana

Memahami DB mirror Postgres v12 ke atas

1 parent 0c884c1c
......@@ -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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!