Postgres

PostgreSQL 10 : Performances improvements

PostgreSQL 10 is coming soon, it is scheduled for tomorrow : See this commit

This release includes expected features :

  • Logical replication
  • Native partitioning
  • Better parallelism support
  • Multi-column statistics

For an exhaustive list see:

In this article I will expose you performance improvements that are not listed in the releases notes! Surprisingly, the community does not list these kinds of improvements: they do not represent a significant change from user experience.

PostgreSQL : Deferrable constraints

Differ constraints verification

Note: This article was written during my activity at Dalibo

Postgres respects ACID properties, so it guarantees the consistency of the database: a transaction will bring the database from one valid state to another.

The data in the different tables is not independent but obeys semantic rules put in place when designing the conceptual model. The main purpose of integrity constraints is to ensure the consistency of the data between them, and therefore to ensure that they respect these semantic rules. If an insert, an update or a delete violates these rules, the transaction is purely and simply canceled.

Postgres performs constraint verification on each change (when constraints have been defined). It is also possible to delay the checking of the constraints at the end of the transaction, at the time of the commit. Thus, the verifications will only be produced on the effective changes between the delete, update and insert operations of the whole transaction.