You can't alter table to create partition on existing table. You need create new table and migrate data to new table with partition. If table have partition key, the partition range should be part of ...
Efficiently manage and query large-scale time-series log data using PostgreSQL range-based partitioning and Node.js-based automation for partition creation and dummy log insertion.