@@ -161,12 +161,12 @@ writeBackupCatalogConfig(FILE *out, pgBackupConfig *config)
161161 if (config -> master_user )
162162 fprintf (out , "master-user = %s\n" , config -> master_user );
163163
164- convert_from_base_unit_u (config -> replica_timeout , OPTION_UNIT_S ,
164+ convert_from_base_unit_u (config -> replica_timeout , OPTION_UNIT_MS ,
165165 & res , & unit );
166166 fprintf (out , "replica-timeout = " UINT64_FORMAT "%s\n" , res , unit );
167167
168168 fprintf (out , "#Archive parameters:\n" );
169- convert_from_base_unit_u (config -> archive_timeout , OPTION_UNIT_S ,
169+ convert_from_base_unit_u (config -> archive_timeout , OPTION_UNIT_MS ,
170170 & res , & unit );
171171 fprintf (out , "archive-timeout = " UINT64_FORMAT "%s\n" , res , unit );
172172
@@ -183,11 +183,11 @@ writeBackupCatalogConfig(FILE *out, pgBackupConfig *config)
183183 fprintf (out , "log-directory = %s\n" , config -> log_directory );
184184 /* Convert values from base unit */
185185 convert_from_base_unit_u (config -> log_rotation_size , OPTION_UNIT_KB ,
186- & res , & unit );
186+ & res , & unit );
187187 fprintf (out , "log-rotation-size = " UINT64_FORMAT "%s\n" , res , (res )?unit :"KB" );
188188
189- convert_from_base_unit_u (config -> log_rotation_age , OPTION_UNIT_S ,
190- & res , & unit );
189+ convert_from_base_unit_u (config -> log_rotation_age , OPTION_UNIT_MS ,
190+ & res , & unit );
191191 fprintf (out , "log-rotation-age = " UINT64_FORMAT "%s\n" , res , (res )?unit :"min" );
192192
193193 fprintf (out , "#Retention parameters:\n" );
@@ -237,8 +237,8 @@ readBackupCatalogConfigFile(void)
237237 { 's' , 0 , "log-filename" , & (config -> log_filename ), SOURCE_CMDLINE },
238238 { 's' , 0 , "error-log-filename" , & (config -> error_log_filename ), SOURCE_CMDLINE },
239239 { 's' , 0 , "log-directory" , & (config -> log_directory ), SOURCE_CMDLINE },
240- { 'u ' , 0 , "log-rotation-size" , & (config -> log_rotation_size ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_KB },
241- { 'u ' , 0 , "log-rotation-age" , & (config -> log_rotation_age ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_S },
240+ { 'U ' , 0 , "log-rotation-size" , & (config -> log_rotation_size ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_KB },
241+ { 'U ' , 0 , "log-rotation-age" , & (config -> log_rotation_age ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_MS },
242242 /* connection options */
243243 { 's' , 0 , "pgdata" , & (config -> pgdata ), SOURCE_FILE_STRICT },
244244 { 's' , 0 , "pgdatabase" , & (config -> pgdatabase ), SOURCE_FILE_STRICT },
@@ -250,11 +250,11 @@ readBackupCatalogConfigFile(void)
250250 { 's' , 0 , "master-port" , & (config -> master_port ), SOURCE_FILE_STRICT },
251251 { 's' , 0 , "master-db" , & (config -> master_db ), SOURCE_FILE_STRICT },
252252 { 's' , 0 , "master-user" , & (config -> master_user ), SOURCE_FILE_STRICT },
253- { 'u' , 0 , "replica-timeout" , & (config -> replica_timeout ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_S },
253+ { 'u' , 0 , "replica-timeout" , & (config -> replica_timeout ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_MS },
254254 /* other options */
255255 { 'U' , 0 , "system-identifier" , & (config -> system_identifier ), SOURCE_FILE_STRICT },
256256 /* archive options */
257- { 'u' , 0 , "archive-timeout" , & (config -> archive_timeout ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_S },
257+ { 'u' , 0 , "archive-timeout" , & (config -> archive_timeout ), SOURCE_CMDLINE , SOURCE_DEFAULT , OPTION_UNIT_MS },
258258 {0 }
259259 };
260260
@@ -373,13 +373,13 @@ show_configure_json(pgBackupConfig *config)
373373 true);
374374
375375 json_add_key (buf , "replica-timeout" , json_level , true);
376- convert_from_base_unit_u (config -> replica_timeout , OPTION_UNIT_S ,
376+ convert_from_base_unit_u (config -> replica_timeout , OPTION_UNIT_MS ,
377377 & res , & unit );
378378 appendPQExpBuffer (buf , UINT64_FORMAT "%s" , res , unit );
379379
380380 /* Archive parameters */
381381 json_add_key (buf , "archive-timeout" , json_level , true);
382- convert_from_base_unit_u (config -> archive_timeout , OPTION_UNIT_S ,
382+ convert_from_base_unit_u (config -> archive_timeout , OPTION_UNIT_MS ,
383383 & res , & unit );
384384 appendPQExpBuffer (buf , UINT64_FORMAT "%s" , res , unit );
385385
@@ -416,7 +416,7 @@ show_configure_json(pgBackupConfig *config)
416416 appendPQExpBuffer (buf , UINT64_FORMAT "%s" , res , (res )?unit :"KB" );
417417
418418 json_add_key (buf , "log-rotation-age" , json_level , true);
419- convert_from_base_unit_u (config -> log_rotation_age , OPTION_UNIT_S ,
419+ convert_from_base_unit_u (config -> log_rotation_age , OPTION_UNIT_MS ,
420420 & res , & unit );
421421 appendPQExpBuffer (buf , UINT64_FORMAT "%s" , res , (res )?unit :"min" );
422422
0 commit comments