v.23.2Improvement
Add optional S3 setting allow_head_object_request to use GetObjectAttributes by default.
Add a new S3 settingallow_head_object_request. This PR makes usage ofGetObjectAttributesrequest instead ofHeadObjectintroduced in https://github.com/ClickHouse/ClickHouse/pull/45288 optional (and disabled by default). #45701 (Vitaly Baranov).
Why it matters
The feature allows users to choose between theGetObjectAttributes request, which is used by default, and the legacy HeadObject request for retrieving metadata about S3 objects. This flexibility can help in environments where GetObjectAttributes is unsupported or causes issues, improving compatibility with different S3 providers.How to use it
To enable the use of theHeadObject request instead of the default GetObjectAttributes, set the S3 setting allow_head_object_request to true. By default, this setting is false, so GetObjectAttributes will be used unless overridden.