Scaling PostgreSQL Performance Using Table Partitioning
Partition Function
A partition functionis a Stored Procedure that determines which child table should accept a new record. The master table has a trigger which calls a partition function. There are two typical methodologies for routing records to child tables: