Hi Daniil,
Thanks for the patch.
> main idea of this patch (for REL_17_STABLE)
Your patch should target the `master` branch. Also please add a
corresponding entry to the nearest open commitfest [1].
> In my opinion, this will be useful primarily to simplify testing, since at the moment you have to create segments
manually(as in this article).
In this case you should add a test or two that demonstrate this. As
separate commits perhaps.
If you could also demonstrate that these tests improve code coverage
for instance that would be great.
[1]: https://commitfest.postgresql.org/
--
Best regards,
Aleksander Alekseev