File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 13
13
14
14
15
15
/*
16
- * install_db_support_functions ()
16
+ * install_support_functions_in_db ()
17
17
*
18
18
* pg_upgrade requires some support functions that enable it to modify
19
19
* backend behavior.
20
20
*/
21
21
void
22
- install_db_support_functions (const char * db_name )
22
+ install_support_functions_in_db (const char * db_name )
23
23
{
24
24
PGconn * conn = connectToServer (& new_cluster , db_name );
25
25
Original file line number Diff line number Diff line change @@ -225,8 +225,11 @@ prepare_new_databases(void)
225
225
226
226
prep_status ("Creating databases in the new cluster" );
227
227
228
- /* install support functions in the database used by GLOBALS_DUMP_FILE */
229
- install_db_support_functions (os_info .user );
228
+ /*
229
+ * Install support functions in the database accessed by
230
+ * GLOBALS_DUMP_FILE because it can preserve pg_authid.oid.
231
+ */
232
+ install_support_functions_in_db (os_info .user );
230
233
231
234
/*
232
235
* We have to create the databases first so we can install support
@@ -261,7 +264,9 @@ create_new_objects(void)
261
264
{
262
265
DbInfo * new_db = & new_cluster .dbarr .dbs [dbnum ];
263
266
264
- install_db_support_functions (new_db -> db_name );
267
+ /* skip db we already installed */
268
+ if (strcmp (new_db -> db_name , os_info .user ) != 0 )
269
+ install_support_functions_in_db (new_db -> db_name );
265
270
}
266
271
check_ok ();
267
272
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ void check_hard_link(void);
321
321
322
322
/* function.c */
323
323
324
- void install_db_support_functions (const char * db_name );
324
+ void install_support_functions_in_db (const char * db_name );
325
325
void uninstall_support_functions (void );
326
326
void get_loadable_libraries (void );
327
327
void check_loadable_libraries (void );
You can’t perform that action at this time.
0 commit comments