Neues vom PostgreSQL Planet
Craig Kerstiens: Getting comfortable with psql
psql is a CLI editor that ships with Postgres. It’s incredibly powerful for working with Postgres, and doesn’t take too much of a learning curve to start to get comfortable so you can really feel like an expert working with your database.
Just a rundown of a few things to get you started:
Once connected in psql you can get an idea of all utility commands available with:
\?A handy thing I use all the time is \d.
Deepak Mahto: Understanding Volatility in PL/pgSQL Functions: A Real-World Lesson
The PL/pgSQL language, available as a default extension in PostgreSQL, provides powerful tools and flexibility for application developers to build complex, enterprise-scale functionality within the database. Through PL/pgSQL’s functions and procedures, developers can choose different volatility categories—IMMUTABLE, STABLE, or VOLATILE—that offer varying performance benefits, especially in terms of result caching and data state awareness. For a deeper dive, refer to the official documentation.
Radim Marek: Text identifiers in PostgreSQL database design
Whether you are designing a standalone application or a microservice, you will inevitably encounter the topic of sharing identifiers. Whether it’s URLs of web pages, RESTful API resources, JSON documents, CSV exports, or something else, the identifier of specific resources will be exposed.
/orders/123 /products/345/variants/1While an identifier is just a number and does not carry any negative connotations, there are valid reasons why you might want to avoid exposing them. These reasons include:
Douglas Hunley: Crunchy Postgres via Automation V2.2
Christopher Winslett: 8 Steps in Writing Analytical SQL Queries
It is never immediately obvious how to go from a simple SQL query to a complex one -- especially if it involves intricate calculations. One of the “dangers” of SQL is that you can create an executable query but return the wrong data. For example, it is easy to inflate the value of a calculated field by joining to multiple rows.
Let’s take a look at a sample query. This appears to look for a summary total of invoice amounts across teams. If you look closely, you might see that the joins would inflate a team’s yearly invoice spend for each team member.
semab tariq: Scenarios That Trigger Autovacuum in PostgreSQL
PostgreSQL is widely known for its Multi-Version Concurrency Control (MVCC) model, which allows multiple transactions to occur simultaneously without interfering with each other.
However, one side effect of MVCC is the creation of dead tuples—old versions of data rows that are no longer needed but still occupy space.
Dead tuples also lead to a phenomenon known as table bloat, which refers to the excessive unused space in a table caused by dead tuples that haven't been cleaned up, resulting in inefficient storage and reduced performance
Marat Bogatyrev: From Backup to Integrity: Leveraging WAL-G for PostgreSQL
A key aspect of maintaining backup integrity is understanding data checksums. Without proper checksum validation, detecting data corruption becomes virtually impossible. Therefore, we will start with The Importance of Data Checksums.
The Importance of Data ChecksumsEnsuring data integrity is crucial for the reliability of any database system. Data checksum validation is essential for ensuring data integrity. Checksums help detect data corruption caused by hardware issues.
Jimmy Angelakos: PGConf.EU 2024 in Athens, Extension Summit, OpenStreetMap talk, and others
This year, the 14th annual PostgreSQL Conference Europe (PGConf.EU for short) took place from October 22nd to October 25th in the historic city of Athens, Greece, featuring awesome content and awesome Mediterranean weather.
Wim Bertels: PGConf.be 2024
The shared presentations are online, as are a couple of recordings and turtle-loading have-a-cup-of-tea locally stored photos.
Jan Wieremjewicz: An Elephant in the Cluster: Making PostgreSQL Feel at Home on Kubernetes
Umair Shahid: Transitioning from Oracle to PostgreSQL: Partitioning
As databases grow, managing large tables becomes more challenging. Table partitioning is a tried-and-tested approach that helps break down large tables into smaller, more manageable segments, enhancing performance, maintainability, and scalability.
What is Table Partitioning?
Umair Shahid: Transitioning from Oracle to PostgreSQL: Partitioning
As databases grow, managing large tables becomes more challenging. Table partitioning is a tried-and-tested approach that helps break down large tables into smaller, more manageable segments, enhancing performance, maintainability, and scalability.
What is Table Partitioning?
Hubert 'depesz' Lubaczewski: System views added to pgdoc.link
Luca Ferrari: PostgreSQL is super solid in enforcing (well established) constraints!
A note about mgirating from other databases…
PostgreSQL is super solid in enforcing (well established) constraints!Well, let’s turn that around: SQLite3 is somehow too flexible in allowing you to store data!
We all know that.
And we all have been fighting situations where we have a well defined structure in SQLite3 and, ocne we try to migrate to PostgreSQL, a bad surprise arrives! As an example, today I was trying to migrate a Django project with the built-in loaddata from a dumpdata, and sadly:
Shaun Thomas: Plugging the Postgres Upgrade Hole
Hubert 'depesz' Lubaczewski: Waiting for PostgreSQL 18 – Add SQL function array_reverse()
Jimmy Angelakos: Contributions for the week of 2024-10-28 (Week 44 overview)
-
PGConf.EU 2024, held in Athens from October 22-25, was the biggest PostgreSQL event in the world yet! It was organized by: