Bug reference: 15728 Logged by: DamionZ Zhao Email address: zhq651@126.com PostgreSQL version: 11.2 Operating system: linux Description: [...] we see that index on population is created automaticly. Does it make sense? ONLY's means is different between created partiton and new partition.
Documented behavior.
"""
If the ONLY option is specified, no recursion is done, and the index is marked invalid. (ALTER INDEX ... ATTACH PARTITION marks the index valid, once all partitions acquire matching indexes.) Note, however, that any partition that is created in the future using CREATE TABLE ... PARTITION OF will automatically have a matching index, regardless of whether ONLY is specified.