Cleaned up and attached as a .patch. The patch implementing autoanalyze on partitioned tables should revert relevant portions of this patch.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных