File tree 1 file changed +2
-6
lines changed 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ get_db_infos(ClusterInfo *cluster)
408
408
i_spclocation = PQfnumber (res , "spclocation" );
409
409
410
410
ntups = PQntuples (res );
411
- dbinfos = (DbInfo * ) pg_malloc (sizeof (DbInfo ) * ntups );
411
+ dbinfos = (DbInfo * ) pg_malloc0 (sizeof (DbInfo ) * ntups );
412
412
413
413
for (tupnum = 0 ; tupnum < ntups ; tupnum ++ )
414
414
{
@@ -636,15 +636,11 @@ get_old_cluster_logical_slot_infos(DbInfo *dbinfo, bool live_check)
636
636
PGconn * conn ;
637
637
PGresult * res ;
638
638
LogicalSlotInfo * slotinfos = NULL ;
639
- int num_slots = 0 ;
639
+ int num_slots ;
640
640
641
641
/* Logical slots can be migrated since PG17. */
642
642
if (GET_MAJOR_VERSION (old_cluster .major_version ) <= 1600 )
643
- {
644
- dbinfo -> slot_arr .slots = slotinfos ;
645
- dbinfo -> slot_arr .nslots = num_slots ;
646
643
return ;
647
- }
648
644
649
645
conn = connectToServer (& old_cluster , dbinfo -> db_name );
650
646
You can’t perform that action at this time.
0 commit comments