New old “debug_parallel_query” setting in PostgreSQL 16
Naming variables Why will force_parallel_mode – the runtime option be renamed to debug_parallel_query in PostgreSQL 16? Proper variable and function naming play a vital role in making code understandable, maintainable, and easily shareable. When we give our variables descriptive names that reflect their purpose, it becomes much simpler for others to understand our code, follow […]
pg_timetable v5.3 is out!
Our team is proud to introduce a new pg_timetable v5.3 release! This time we focused solely on implementing new features for logging. I want to remind you that pg_timetable is a community project. So, please, don’t hesitate to ask any questions, to report bugs, to star the pg_timetable project, and to tell the world about […]
ER diagrams with SQL and Mermaid
What does ER stand for? An Entity Relationship (ER) diagram is one of the most important tools for database design. It helps you visualize the relationships between different entities and how they interact with each other. Many GUI tools have their own tools to build ER diagrams, e.g. pgAdmin IV, DBeaver, etc. In this blog […]
Go & PostgreSQL: FOSDEM 2023 talk
Intro On the 5th of February 2023, I had the privilege of giving a talk at the PostgreSQL devroom during FOSDEM 2023 titled “When it all GOes right.” My talk focused on the process of creating programs in the Go language using a PostgreSQL database. It was an incredible opportunity to share my insights and […]
Reserve connections in PostgreSQL 16
Reserve connections for the pg_use_reserved_connections group in PostgreSQL 16 Nathan Bossart implemented a brand-new patch that provides a way to reserve connection slots for non-superusers. The patch was reviewed by Tushar Ahuja and Robert Haas. Committed by Robert Haas. The commit message is: Let’s try reserve connections in our work! Let’s edit the postgresql.conf file […]
usql: universal psql?
usql? But why? usql is a universal command-line interface for many database. But why are we still using CLI (command line utilities) in the 21st century? And what is wrong with psql? Despite the widespread availability and ease of use of GUI-based tools, many people still prefer to use command line utilities for a number […]
hex, oct, bin integers in PostgreSQL 16
SQL and integer notations NEW in PostgreSQL 16 – support for non-decimal notation of integer constants! PostgreSQL already has powerful support for string constants, with E’\t’, E’\011′, E’\u0009′ and U&’\0009′ all meaning the same thing (a “horizontal tab” character). However, PostgreSQL’s support for numerical constants has – up until now – been rather limited; it […]
pg_dump compression specifications in PostgreSQL 16
What is pg_dump compression? pg_dump is a PostgreSQL utility for backing up a local or remote PostgreSQL database. It creates a logical backup file that contains either plain SQL commands for recreating the database, or a binary file that can be restored with the pg_restore utility. The binary backup file can be used to restore […]
GRANT VACUUM, ANALYZE in PostgreSQL 16
What is GRANT VACUUM, ANALYZE? PostgreSQL uses table VACUUM and ANALYZE commands to optimize the database. The VACUUM command reclaims storage space and makes it available for re-use. It also updates the visibility map, which helps the query planner to quickly identify which parts of the table have live rows. The ANALYZE command collects statistics […]
Migrate scheduled jobs to pg_timetable from pgAgent
Why migrate to pg_timetable from pgAgent? There are many reasons, actually, why people might want to export pgAgent jobs to pg_timetable. Most of them may be spotted by taking a look at the PostgreSQL schedulers comparison table I introduced in one of my previous posts and the supported platform table from the official readme. In […]
Aliases for sub-SELECTS in FROM clause
What are aliases in SQL? SQL aliases in FROM clauses are used to give a result set a temporary name. A result set may be produced by a table or view name, sub-SELECT and/or VALUES clause. An alias is created with the AS keyword, but the grammar allows us to omit it. An alias only […]
Migrate scheduled jobs to pg_timetable from pg_cron
Why migrate to pg_timetable from pg_cron? There are a lot of reasons you may want to migrate from pg_cron: maybe you need to run a scheduler on a platform pg_cron doesn’t support; or you want to run several parallel schedulers simultaneously; it’s possible you hit the bugs in pg_cron that haven’t been fixed for ages […]