Declarative partitioning got some attention in the PostgreSQL 12 release, with some very handy features. There has been some pretty dramatic improvement in partition selection (especially when selecting from a few partitions out of a large set), referential integrity improvements, and introspection. In this article, we’re going to tackle the referential integrity improvement first. This […]
Computed columns in PostgreSQL 12 are here, but still have a ways to go.
The problem If your database has a large number of small tables, you likely have a lot of wasted space. To demonstrate this, let’s create a table with a single record: create table foo (str text); insert into foo values (‘a’); VACUUM foo; Now let’s find out the path of the file containing our data, […]