@@ -154,8 +154,9 @@ BEGIN
154154 END IF;
155155
156156 /* Insert new entry to pathman config */
157+ EXECUTE format(' ANALYZE %s' , parent_relid);
157158 PERFORM @extschema@.add_to_pathman_config(parent_relid, expression,
158- p_interval::TEXT , false );
159+ p_interval::TEXT );
159160
160161 /* Create sequence for child partitions names */
161162 PERFORM @extschema@.create_or_replace_sequence(parent_relid);
@@ -251,8 +252,9 @@ BEGIN
251252 END IF;
252253
253254 /* Insert new entry to pathman config */
255+ EXECUTE format(' ANALYZE %s' , parent_relid);
254256 PERFORM @extschema@.add_to_pathman_config(parent_relid, expression,
255- p_interval::TEXT , false );
257+ p_interval::TEXT );
256258
257259 /* Create sequence for child partitions names */
258260 PERFORM @extschema@.create_or_replace_sequence(parent_relid);
@@ -310,7 +312,8 @@ BEGIN
310312 bounds[array_length(bounds, 1 ) - 1 ]);
311313
312314 /* Insert new entry to pathman config */
313- PERFORM @extschema@.add_to_pathman_config(parent_relid, expression, NULL , false, 2 );
315+ EXECUTE format(' ANALYZE %s' , parent_relid);
316+ PERFORM @extschema@.add_to_pathman_config(parent_relid, expression, NULL , 2 );
314317
315318 /* Create sequence for child partitions names */
316319 PERFORM @extschema@.create_or_replace_sequence(parent_relid);
@@ -360,8 +363,9 @@ BEGIN
360363 end_value);
361364
362365 /* Insert new entry to pathman config */
366+ EXECUTE format(' ANALYZE %s' , parent_relid);
363367 PERFORM @extschema@.add_to_pathman_config(parent_relid, expression,
364- p_interval::TEXT , false );
368+ p_interval::TEXT );
365369
366370 /* Create sequence for child partitions names */
367371 PERFORM @extschema@.create_or_replace_sequence(parent_relid);
@@ -417,8 +421,9 @@ BEGIN
417421 end_value);
418422
419423 /* Insert new entry to pathman config */
424+ EXECUTE format(' ANALYZE %s' , parent_relid);
420425 PERFORM @extschema@.add_to_pathman_config(parent_relid, expression,
421- p_interval::TEXT , false );
426+ p_interval::TEXT );
422427
423428 /* Create sequence for child partitions names */
424429 PERFORM @extschema@.create_or_replace_sequence(parent_relid);
0 commit comments