Neues vom PostgreSQL Planet
Christophe Pettus: OK, sometimes you can lock tables.
Previously, I wrote that you should never lock tables. And you usually shouldn’t! But sometimes, there’s a good reason to. Here’s one.
When you are doing a schema-modifying operation, like adding a column to a table, PostgreSQL needs to take an ACCESS EXCLUSIVE lock on the table while it is modifying the system catalogs. Unless it needs to rewrite the table, this lock isn’t held for very long.
Christophe Pettus: How slow is DECIMAL, anyway?
In PostgreSQL, NUMERIC is a variable length type of fixed precision. You can have as many digits as you want (and you want to pay the storage for). DOUBLE PRECISION is a floating point type, with variable precision.
Sometimes, the question comes up: How much slower is NUMERIC than DOUBLE PRECISION, anyway?
Here’s a quick, highly unscientific benchmark:
Andrew Dunstan: Announcing Release 16 of the PostgreSQL Buildfarm client
Hot on the heels of Release 15 comes Release 16.
This release deals with some issues that have been discovered with the check for update feature of Release 15 and the force_every and trigger_exclude features, so that it now works correctly with those features.
It also features these items:
Greg Sabino Mullane: How to Solve Advent of Code 2022 Using Postgres - Day 12
This article will contain spoilers both on how I solved 2022 Day 12's challenge "Hill Climbing Algorithm" using SQL, as well as general ideas on how to approach the problem. I recommend trying to solve it yourself first, using your favorite language. This article is delayed from the actual puzzle's release. Also note that my solutions are seldom going to be the "best" solutions - they were solved as quickly as possible, and these articles will show my first solutions, with some minor reformatting and cleaning up.
Akhil Reddy Banappagari: Avoiding Constraint violations while migrating Oracle to PostgreSQL – DATE data type
Choosing a correct datatype mapping while migrating from Oracle to PostgreSQL is very important to avoid migration failures. Especially when we have date and time involved, it is very important to understand the behavior in both Oracle and PostgreSQL. We have documented about DATE datatype in Oracle vs SQL Server vs PostgreSQL in our previous article.
Bruce Momjian: Beyond Joins and Indexes
My presentation Explaining the Postgres Query Optimizer covers the details of query optimization, optimizer statistics, joins, and indexes. I have delivered it 20 times since 2011.
Tobias Petry: RETURNING Modified Rows
Jacob Coblentz: Fun with Letters in PostGIS 3.3!
Working at Crunchy Data on the spatial team, I'm always looking for new features and fun things to show on live demos. I recently started playing around with ST_Letters and wanted to jot down some quick code samples for playing around with this feature, introduced in PostGIS 3.3. These examples are super easy to use, they don't need any data!
The screenshots shown below came from pgAdmin's geometry viewer and will also work with other query GUI tools like QGIS or DBeaver.
Henrietta Dombrovskaya: PGSQL Phriday #004 Recap
Thank you to everybody who contributed to the January PGSQL Phriday topic! I suggested “Postgres and Software Development,” while being very well aware that this topic is not popular in the PostgreSQL community. To be completely honest, I thought that it was possible that only Ryan Booz would contribute!
That being said – a big thank you to everyone who participated! Please find a summary of contributions below, and please let me know if I missed your post!
Luca Ferrari: From Numbers to Words using Perl (and Lingua::)!
How to convert a digit into a sentence with the power of Perl.
Hubert 'depesz' Lubaczewski: Waiting for PostgreSQL 16 – Invent random_normal() to provide normally-distributed random numbers.
Chris Travers: A PostgreSQL Developer's Perspective: Six Interesting Patches From November's Commitfest
Ibrar Ahmed: Upgrading PostgreSQL Extensions
PostgreSQL is a powerful and flexible open-source database management system that allows users to install and use extensions to add additional functionality to their databases. In this tutorial, we will cover the process of installing and upgrading PostgreSQL extensions using the example of the pg_stat_monitor extension.
Peter Eisentraut: PostgreSQL largest commits
I like to poke around the PostgreSQL Git repository to find interesting statistics and trends that affect PostgreSQL development. The question I had lately is, what are the largest patches that have been committed? That might indicate some kind of upper bound on the size of features you can get committed in one piece. If something is larger, you might need to split it up.
Akhil Reddy Banappagari: Row level and Column level Security – Oracle vs PostgreSQL
We often get interesting questions from Customers before starting migrations from Oracle to PostgreSQL or SQL Server to PostgreSQL. One of such questions is regarding the Oracle or SQL Server alternatives for security beyond the object level.
Francesco Tisiot: How to JSON in PostgreSQL®
This series covers how to solve common problems on JSON datasets with PostgreSQL® and it includes (links will appear once the target pages are up):
Laurenz Albe: Pagination and the problem of the total result count
© Laurenz Albe 2022
When processing a big result set in an interactive application, you want to paginate the result set, that is, show it page by page. Everybody is familiar with that from the first web search on. You also get a button to scroll to the next page, and you get a total result count. This article shows the various options for pagination of a result set and their performance. It also discusses the problem of the total result count.
Grant Fritchey: Index Types in PostgreSQL: Learning PostgreSQL with Grant
As with any other relational data management system (RDBMS), PostgreSQL uses indexes as a mechanism to improve data access. PostgreSQL has a number of different index types, supporting different behaviors and different types of data. In addition, again, similar to other RDBMS, there are properties and behaviors associated with these indexes.
Alexander Korotkov: Rethinking buffer mapping for modern hardware architectures
Traditional database engines were designed in the ’80s and early ’90s. At that time CPUs were much slower than they are today. Even worse was storage, hard drive head positioning time was enormous . And CPU (or, at most, a few single-core CPUs) was assumed to be infinitely fast in comparison to IOPS. Therefore, systems were designed to save IOPS as much as possible, while CPU overhead was considered a secondary optimization target.
Greg Sabino Mullane: How to Solve Advent of Code 2022 Using Postgres - Day 11
This article will contain spoilers both on how I solved 2022 Day 11's challenge "Monkey in the Middle" using SQL, as well as general ideas on how to approach the problem. I recommend trying to solve it yourself first, using your favorite language. This article is delayed from the actual puzzle's release. Also note that my solutions are seldom going to be the "best" solutions - they were solved as quickly as possible, and these articles will show my first solutions, with some minor reformatting and cleaning up.