pg_rman icon indicating copy to clipboard operation
pg_rman copied to clipboard

fix the range of keep data generation

Open huangfumingyue opened this issue 3 years ago • 2 comments

If you set keep_data_generations = 0, the backup you got will be deleted immediately, I think the setting like keep_data_generations = 0 is meaningless. So, In this PR, the minimum value of the setting range of keep_data_generations has been changed to 1. In addition, keep_srvlog_days, keep_srvlog_files have been modified in the same way.

huangfumingyue avatar Feb 22 '22 09:02 huangfumingyue

Hi, thanks for making the PR. I have some comments.

  • Is there any reason that you didn't change other keep-* parameters (ex. keep-data-days)?
  • Is it better use parse_uint32() in parse_posi()?
  • Though I'm not confident, is it good to add parse_posi() in pguc.c because it seems that the function only returns primitive data types? Is it better to use 'f' option?

mikecaat avatar Feb 25 '22 08:02 mikecaat

In the first place, I got not to be confidence that we must check if the values are zero because the users may want to remove the backup files.

mikecaat avatar Feb 25 '22 08:02 mikecaat