Minimal wal_level optimization can cause slowdowns

We found that using minimal WAL files together with the CREATE TABLE and COPY commands inside a transaction causes a 10x to 300x slowdown, whereas the PostgreSQL code and docs say this will make the commands faster due to optimizations that writes the table directly bypassing the WAL files. The slowdown is amplified by the amount of shared buffers due to the fact that the FlushRelationBuffers function sequentially searches the entire shared buffers.

Slow Queries and the AutoVacuum/Analyze System

I was recently asked by another PostgreSQL DBA about what could be causing queries to run slow while their application is running but then run fast when the application is stopped. While I have given several presentations on this subject, each one has been on a specific cause and not talking about all of them together. I decided I would compile them into a list on this page.


This presentation covers the how to monitor Postgres's AutoVacuum system and how to tune it.

You may read this blog post to see some of the items you can catch by monitoring the AutoVacuum system.


Viewing New Records

What you thought you knew about copying new records from a table with a serial id is all wrong once you have multiple writes happening to your database inside multiple transactions. We ran across into a situation with a MS SQL where we missed getting some records from a table that is appended only. There is a serial primary key and we would grab any new serials since the last grab of data. We found that we missed some records due to the inserts being performed by more than one thread. So developers asked how could we prevent this problem with PostgreSQL.

PostgresConf Silicon Valley

I will be presenting on Viewing data at the intersection between roles at the PostgresConf Silicon Valley which is being held October 15 - 16, 2018 at the Hilton San Jose. The full schedule of the conference is available online.


This is a set of updates for collectd to collect even more data from Postgres that the Default Postgres Configuration file supplied with collectd.

PGConf Organizer

I have become one of the organizers of the PGConf Conferences and so PGConf has released my community profile.

PGConf Local: Austin 2017

I will be in Austin, TX on December 5th, 2017 giving a presentation on the basics of using PostGIS in PostgreSQL. With the basics in this presentation you will be able to find all the items within x distance or all items within a boundary such as a country, state, county, zip code, political boundry, or etc. Resources for free dataset's, such as the US Census Bureau, World Administrative Database, etc.

Seattle GNU/Linux Conference

I will be helping to man the SeaPUG/PGUS/Postgres Booth at the Seattle GNU/Linux (SeaGL) on 10/6-7/2017. This is a free conference at Seattle Central Community College. The presentation schedule has been posted on their website. Next year we will be submitting Postgres presentations for this conference.

PGConf Local: Seattle 2017 - Presentation Announcement

The first ever PGConf US Local: Seattle event is happening in partnership with SEAPUG on November 13th and 14th at the Sheraton Downtown Seattle!

On November 13th we have four training options available:


Subscribe to Lloyd Albin RSS