My Postgres box can melt your face

I have beed doing (mediocre) dbadmin work forever. MS SQL Server, MySQL (pre-MariaDB), and Postgres have minded my data at various times for two decades. MySQL was OK. I lived in constant fear SQL Server had broken into my house and boiled my rabbit when I wasn’t looking1. But Postgres has always been a rock. My biggest worry with Postgres is forgetting it’s there and not doing my dbadmin why is my backup folder empty? due diligence.

For giggles I decided to see what my server was up to. It’s a VM with a single virtual CPU and 8GB of RAM. You can figure out how many SQL transactions your server has been up to with:

select sum(xact_commit) from pg_stat_database

That’ll give you the number of transactions since the last restart. Run it again in an hour, subtract the first from the second, that’s how transaction-busy your server has been.

Well, in 98 minutes during the day my server did 121,527 transactions. That’s an average of 1,240 transactions per minute or 21 transactions per second. Yowza. I better check how old Betsy is holding up.

bored server is bored

Old Betsy is bored. As in, most of the time the CPU didn’t even register. HTOP tries to scare you by grouping used memory with cached memory, but that yellow in the memory bar is really free if it needs to be. I’ve got about 7 of my 8 GB’s just caching. I should probably tell Postgres to use more of it, but looking at cache and index hit ratios it really doesn’t need it.

Not really much of a point here, other than to say man I love Postgres.

1 It’s a lot better now than it used to be, but back during the SQL Server 6.x/SDE 3.x days it was a flaming bag of poo.