Ensure that the 'template1' database should not be visible after pg_upgrade. Fixes #5875

This commit is contained in:
Rahul Shirsat
2020-12-16 11:37:19 +05:30
committed by Akshay Joshi
parent 21333490ef
commit cb0a914099
25 changed files with 148 additions and 29 deletions

View File

@@ -143,6 +143,11 @@ class ExtensionView(PGChildNodeView, SchemaDiffObjectCompare):
if self.manager.db_info is not None and \
kwargs['did'] in self.manager.db_info else 0
self.datistemplate = \
self.manager.db_info[kwargs['did']]['datistemplate'] \
if self.manager.db_info is not None and \
kwargs['did'] in self.manager.db_info else False
return f(*args, **kwargs)
return wrap
@@ -247,7 +252,7 @@ class ExtensionView(PGChildNodeView, SchemaDiffObjectCompare):
)
res['rows'][0]['is_sys_obj'] = (
res['rows'][0]['oid'] <= self.datlastsysoid)
res['rows'][0]['oid'] <= self.datlastsysoid or self.datistemplate)
return True, res['rows'][0]