1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/test/lib/pgBackRestTest/Env/Host
David Steele 02b06aa495
Increase max index allowed for pg/repo options to 256.
The prior limitations were based on using getopt_long() to parse command-line options, which required a static list of allowed options. Setting index max too high bloated the binary unacceptably. 45a4e80 replaced the functionality of getopt_long() but the static list remained.

Improve cfgParseOption() to use available option data and remove the need for a static list. This also allows the option deprecations to be represented more compactly.

Index max is still capped at 256 because a large enough index could cause parseOptionIdxValue() to run out of memory since it allocates a static list based on the highest index found. If that function were improved with a map of found index values then index max could be set to UINT64_MAX.

Note that deprecations no longer set an index max or define whether reset is valid. These were space-saving measures which are no longer required. This means that indexed deprecated options will also be valid up to 256 and always allow reset, but it doesn't seem worth additional code to limit this behavior.

cfgParseOptionId() is no longer needed because calling cfgParseOption() with .ignoreMissingIndex = true duplicates the functionality of cfgParseOptionId(). This leads to some simplification in the help code.
2021-08-31 12:09:50 -04:00
..
HostAzureTest.pm Use lower-case names from Azure identifiers in integration tests. 2021-06-09 12:28:40 -04:00
HostBackupTest.pm Increase max index allowed for pg/repo options to 256. 2021-08-31 12:09:50 -04:00
HostBaseTest.pm GCS support for repository storage. 2021-03-05 12:13:51 -05:00
HostDbCommonTest.pm Improve archive-push command fault tolerance. 2021-03-25 12:54:49 -04:00
HostDbSyntheticTest.pm Rename most instances of master to primary in tests. 2020-06-16 14:06:38 -04:00
HostDbTest.pm Add PostgreSQL 14 support. 2021-05-24 17:17:03 -04:00
HostGcsTest.pm GCS support for repository storage. 2021-03-05 12:13:51 -05:00
HostS3Test.pm Use minio latest in documentation and integration tests. 2021-01-26 11:25:29 -05:00