1111
1212class _PostgresqlUpgrade (Postgresql ):
1313
14- _INCOMPATIBLE_EXTENSIONS = ('amcheck_next' , 'pg_repack ' ,)
14+ _INCOMPATIBLE_EXTENSIONS = ('pgaudit ' ,)
1515
1616 def adjust_shared_preload_libraries (self , version ):
1717 from spilo_commons import adjust_extensions
@@ -58,7 +58,7 @@ def set_bin_dir(self, version):
5858
5959 @property
6060 def local_conn_kwargs (self ):
61- conn_kwargs = self .config . local_connect_kwargs
61+ conn_kwargs = self .connection_pool . conn_kwargs
6262 conn_kwargs ['options' ] = '-c synchronous_commit=local -c statement_timeout=0 -c search_path='
6363 conn_kwargs .pop ('connect_timeout' , None )
6464 return conn_kwargs
@@ -71,7 +71,6 @@ def drop_possibly_incompatible_extensions(self):
7171
7272 logger .info ('Dropping extensions from the cluster which could be incompatible' )
7373 conn_kwargs = self .local_conn_kwargs
74-
7574 for d in self ._get_all_databases ():
7675 conn_kwargs ['dbname' ] = d
7776 with get_connection_cursor (** conn_kwargs ) as cur :
@@ -189,10 +188,10 @@ def pg_upgrade(self, check=False):
189188 def prepare_new_pgdata (self , version ):
190189 from spilo_commons import append_extensions
191190
192- locale = self .query ('SHOW lc_collate' ). fetchone () [0 ]
193- encoding = self .query ('SHOW server_encoding' ). fetchone () [0 ]
191+ locale = self .query ('SHOW lc_collate' )[ 0 ] [0 ]
192+ encoding = self .query ('SHOW server_encoding' )[ 0 ] [0 ]
194193 initdb_config = [{'locale' : locale }, {'encoding' : encoding }]
195- if self .query ("SELECT current_setting('data_checksums')::bool" ). fetchone () [0 ]:
194+ if self .query ("SELECT current_setting('data_checksums')::bool" )[ 0 ] [0 ]:
196195 initdb_config .append ('data-checksums' )
197196
198197 logger .info ('initdb config: %s' , initdb_config )
0 commit comments