Huge Pages and NUMA

Huge Pages and NUMA

graph TD A["User Process (PostgreSQL Backend)"] --> B{"Virtual Address Space (Backend)"}; B -- Accesses Data --> C["Shared Memory Segment (Mapped into VAS)"]; C --> D{"Shared Buffers (Within Shared Memory)"}; D -- Holds Data from --> E[PostgreSQL Data Files on Disk]; subgraph "Virtual Address Space (Backend)" B1["Process Private Memory (work_mem, etc.)"] B2["Shared Memory Segment (for shared_buffers)"] B --o B1 B --o B2 end style B fill:#ccf,stroke:#333,stroke-width:2px style C fill:#9cf,stroke:#333,stroke-width:2px style D fill:#cff,stroke:#333,stroke-width:2px style E fill:#eee,stroke:#333,stroke-width:2px style A fill:#fff,stroke:#333,stroke-width:2px
Order matters (provisional)

Order matters (provisional)

When a table is designed the columns have an order that follows the human logic that doesn’t necessary gives coincides with the way PostgreSQL stores the data ad may cause unnecessary bloat.

Let’s find out why the column order is important and how we can use it to improve our storage and consequently get better performance.

The Tux and the Pachyderm

The Tux and the Pachyderm

In the previous blog post we have seen how plenty of ram doesn’t necessary results in a faster instance.

This time we’ll quickly see how PostgreSQL and Linux relate to each other in particular if we want to run our RDBMS at scale.

Then we’ll have a look to the virtual memory in Linux and how to make it more friendly to PostgreSQL.

Let’s dig in.

Size matter

Size matter

Nowadays it’s not uncommon to deal with machines with hundreds of GB of RAM.

Abundant memory can give PostgreSQL a massive performance boost. However things work slightly different than you may expect.

Let’s find out!

Not open to public

Not open to public

Back in 2020 at the FOSDEM PGDay I discovered how the public schema’s permissions were far too permissive.

In any PostgreSQL up to version 14 any logged user could create relations or functions in the public schema posing a concrete risk for the database security.

In this post I want to recollect the thoughts about the issue, how to fix it and why it shouldn’t be ignored even if the instance has been migrated to a PostgreSQL version in theory not affected by the problem.

PGDay Napoli 2025

PGDay Napoli 2025

Finally I found time to get a grip on the issues I had with gohugo and get my blog operational again.

I’m taking the occasion to write about a project I care a lot as it’s strictly related with my hometown, the upcoming PGDay Napoli.

DBA day 2022 and other silly stuff

DBA day 2022 and other silly stuff

Again there is another pretty long hiatus.

Thing happens and independently from how bad my childhood was, family comes first.

Anyway after a rollercoaster ride that started in July 2021 things are getting more stable.

FOSDEM PostgreSQL devroom video

FOSDEM PostgreSQL devroom video

For obvious reason the FOSDEM this year is an online event. The staff is building from scratch an infrastructure in order to deliver the speaker’s videos in a virtual environment.

The catch is that all the talks must be pre recorded and uploaded via pentabarf, the software historically used by FOSDEM to manage the talk submissions.

What follows is my experience in recording,uploading and submitting the video for my upcoming talk.