Illinois Prairie PUG January Edition

We just had the first meetup of 2026, and all I can say is a huge thank you to Ryan Booz and all attendees, both in person and virtual!

I was so happy to see many familiar faces, as well as first-timers. We had great attendance (one of those rare situations when I didn’t order enough pizza :)). Ryan Booz, who, as I previously mentioned, is one of the few out-of-towners who dare to face Chicago winter weather, presented a great talk on configuring Postgres for effective logging and query-optimization analysis.

I liked the fact that we had 30 participants that early in the year, when people are just starting to get back to their regular activity level. More importantly, we now have a group of active members who not only keep coming to the meetups but also actively listen, participate in discussions, and stay long after the presentation ends, discussing what they just heard, sharing experiences, suggesting future topics, and talking about how we can make Postgres more appealing to application developers! I always have to remind the last group of people staying late that, as much as I love them all, I need to close the house, but those are my happiest moments!

On days like that, I have this strong feeling of community building happening right here, and that’s the most rewarding thing I could wish for.

carview.php?tsp=
carview.php?tsp=
carview.php?tsp=
carview.php?tsp=

Presentation slides and sql examples are available here, and below is the meetup recording. Please not the quick turnaround of the video! We tried!

Leave a comment

Filed under events

pg_acm is here!

I am writing this post over the weekend but scheduling it to be published on Tuesday, after the PG DATA CfP closes, because I do not want to distract anyone, including myself, from the submission process.

A couple of months ago, I created a placeholder in my GitHub, promising to publish pg_acm before the end of the year. The actual day I pushed the initial commit was January 3, but it still counts, right? At least, it happened before the first Monday of 2026!

It has been about two years since I first spoke publicly about additional options I would love to see in PostgreSQL privileges management. Now I know it was not the most brilliant idea to frame it as “what’s wrong with Postgres permissions,” and this time I am much better with naming.

pg_acm stands for “Postgres Access Control Management.” The key feature of this framework is that each schema is created with a set of predefined roles and default privileges, which makes it easy to achieve complete isolation between different projects sharing the same database, and allows authorized users to manage access to their data without having superuser privileges.

Please take a look, give it a try, and let me know what’s wrong with my framework 🙂

Leave a comment

Filed under Data management, publications and discussions

November Meetup Recording

And our last 2025 recording is here! Check out Jay Miller’s talk!

Leave a comment

Filed under events

Prairie PostgreSQL User Group November Meetup

On Tuesday, we had our last meetup of 2025, and we want to thank everyone who attended, and who supported us during 2025. An of course, very special thanks to Jay Miller, who present at both our first and last meetups! Everyone enjoyed the presentation, as well as pre-and post-conversations and pizza! Here as the presentation slides (Jay, thank you for sharing!):

Prairie Postgres mission is promoting Postgres best practices to application developers who use Postgres as their backend, and address their needs, so this talk could not be more relevant! Everyone had a great time, and the event recording will be available shortly.

carview.php?tsp=
carview.php?tsp=
carview.php?tsp=
carview.php?tsp=

Our next meetup is tentatively planned for January 13, but watch for announcements! Check us out at our official website, LinkedIn, and the meetup page!

Happy Holidays!

1 Comment

Filed under events

October PUG Recording

Almost a month late, but I hope you enjoy it!

Leave a comment

Filed under community, events, talks

Check out my new repo: logs_processing

I finally shared the set of functions that I use to process pgBadger raw output.

There will be more documentation, I promise, but at least the code is there, along with two of many presentations.

Enjoy! https://github.com/hettie-d/logs-processing

Leave a comment

Filed under Data management

Prairie Postgres Birthday Meetup

Huge thanks to everyone who came to the Prairie Postgres meetup and celebrated our first birthday with us! Thank you for helping me to rehearse my talk, and for your insightful questions!

Here are my presentation slides:

And we had a cake!

Leave a comment

Filed under Data management, events

How I learned to use wal_inspect

It has been a while since last time I blogged about any real-database-life problems and investigation. Here is one which I am really happy about, because it took a while and it was not obvious, but I found the root cause of a problem!

The problem has been going on for months: one of the Postgres databases WAL file system was growing with an alarming speed, many times faster than the database itself. Not like we can’t promptly remove the WALs, but this situation made any database restore a reali nightmare. At first, I suspected long transactions with suboptimal backfill algorithms. There were, indeed, a lot of jobs running on a regular basis which could be improved, however, I noticed a couple of things.

First, when the users fixed one of the primary suspects jobs, the situation with WAL growth didn’t change. Second, the rate of the growth couldn’t be explained by these suboptimal jobs: the data volumes they were removing and reloading were still magnitudes smaller than the WAL size we were dealing with. Finally, I decided to do what I should have done from the start – to take a look at what exactly was in these super-fast growing WALs.

Here is what I did:

create extension  pg_walinspect;

select pg_current_wal_insert_lsn();  /* save the result: '17797/A167C8E8' */

select pg_current_wal_insert_lsn() /* save the result : '17797/FEDE0CC8'*/

select * from  pg_get_wal_stats('17797/A167C8E8', '17797/FEDE0CC8', true)
where count>0;

carview.php?tsp=

To my amazement, I realized that 97% of the WALs stored the information about locks! To be honest, I didn’t even know that locks are recorded in the WAL files, so I am thankful for gracious Postgres community enlightening me!

Now that I knew where to look, I ran the following:

select * from pg_get_wal_records_info('17797/A167C8E8', '17797/FEDE0CC8')
where resource_manager='Heap'
and record_type='LOCK'

carview.php?tsp=

Zooming in:

carview.php?tsp=

Next, I found the table which had all these locks:

select * from pg_class where oid =10229951

When I found this_table_name, I was able to inspect the pgBadger database I find the specific statements:

select * 
from this_customer_logs.this_database_log_t_2025_07_25
where query like '%this_table_name%'

As it turned out, although UPDATE seems to be a cause of slowness/lock waits, the UPDATE itself is executed in between 1 and 2 ms when there are no waits. The actual cause of slowness is one slow select executed in a read transaction – see the sequence of events:

carview.php?tsp=

Thus, the cause of this gigantic WAL growth was one (actually, two) slow SELECT statement(s)! Who would’ve guessed?!

8 Comments

Filed under Data management

September PUG recording

I am glad we had an option to replay this talk from PG Day Chicago one more time! If you didn’t have a chance to join us, here is the recording – enjoy!

Leave a comment

Filed under Data management, events

DjangoCon US – Thank you!!!!

Dear Django community! Thank you so much for welcoming me at DjangoCon US! Thank you for staying focused during the very last presentation of the day, and for dealing with my slides advancing in the wrong direction 😂

Here is my presentation (all slides in the correct order!). Please feel free to reach out with any questions!

Leave a comment

Filed under events, talks