File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def _configure_extensions(self):
43
43
44
44
if 'pg_stat_statements' in extensions :
45
45
needed_libraries .append ('pg_stat_statements' )
46
- elif 'pg_buffercache' in extensions :
46
+ if 'pg_buffercache' in extensions :
47
47
needed_libraries .append ('pg_buffercache' )
48
48
else :
49
49
logging .warning ("Please install 'contrib' modules: "
@@ -68,7 +68,7 @@ def _configure_extensions(self):
68
68
libraries = needed_libraries
69
69
else :
70
70
libraries = libraries .split (',' )
71
- libraries = [ext .strip () for ext in libraries ]
71
+ libraries = [ext .strip (). strip ( '"' ) for ext in libraries ]
72
72
for candidate_ext in needed_libraries :
73
73
extension_found = False
74
74
for installed_ext in libraries :
@@ -81,7 +81,8 @@ def _configure_extensions(self):
81
81
extension_found = True
82
82
if not extension_found :
83
83
libraries .append (candidate_ext )
84
- libraries = ',' .join (libraries )
84
+ libraries = ["'{0}'" .format (lib ) for lib in libraries ]
85
+ libraries = ', ' .join (libraries )
85
86
self ._run_query (
86
87
"alter system set shared_preload_libraries to {0};" .format (
87
88
libraries ))
Original file line number Diff line number Diff line change @@ -20,8 +20,10 @@ su postgres -c '/usr/pgsql-9.5/bin/initdb -D /var/lib/pgsql/9.5/data'
20
20
su postgres -c ' /usr/pgsql-9.5/bin/pg_ctl start -w -D /var/lib/pgsql/9.5/data'
21
21
22
22
# mamonsu tune
23
+ echo " shared_preload_libraries = '\"\$ libdir/pg_stat_statements\" '" > /var/lib/pgsql/9.5/data/postgresql.auto.conf
23
24
mamonsu tune
24
25
su postgres -c ' /usr/pgsql-9.5/bin/pg_ctl restart -w -D /var/lib/pgsql/9.5/data'
26
+ grep " shared_preload_libraries \= '\"\$ libdir/pg_stat_statements\" , pg_buffercache'" /var/lib/pgsql/9.5/data/postgresql.auto.conf
25
27
26
28
# mamonsu report
27
29
(mamonsu report | grep version | grep ' PostgreSQL 9.5' ) || exit 1
You can’t perform that action at this time.
0 commit comments