


#POSTGRESQL 13 UPDATE#
While the partitions can be accessed directly, the queries are typically directed at the logical parent relation and the tuples are routed to the correct partition for inserts and update and in-case of a read query the desired partitions are scanned for executing the client query. The parent partition table doesn’t store any data, the data is stored in the partitions defined when creating the partitioned table. Partitioning is way of splitting or dividing a large table into smaller pieces, the table can be divided using the List, Range or Hash partitioning techniques offered by PG. Quick introduction to partitioning and timeline of adding partitioning features to PG before we get into the enhancements done in PG-13. I am going to list down all the partitioning enhancements in the blog and and will demonstrate some of them with examples. This blog is about number of enhancements for partitions added to PG-13. All the artefacts required for setting up partitioning would be done by simply creating the partition table and specify the partitions using a standard syntax, this is was great step forward and the one that makes this feature very user friendly. Thanks to the great work from Amit Langote and others, the declarative partitioning feature on PG-10 meant that the user don’t need to create the partitions manually or create the constraints and triggers for routing the rows to the correct partition. Before declarative partitioning a=commitdiff h=f0e44751d7175f was added to PG, it meant that the child partitions, constraints and triggers etc needed to be created manually which can be cumbersome and could lead to errors. The exclusion constraint will basically do the pruning of tables based on the query filter. The partitioning feature in PostgreSQL was first added by PG 8.1 by Simon Rigs, it has based on the concept of table inheritance and using constraint exclusion to exclude inherited tables (not needed) from a query scan. The table partitioning feature in PostgreSQL has come a long way after the declarative partitioning syntax added to PostgreSQL 10.
