Quantcast
Channel: CMD: Alvaro Herrera's Blog
Browsing all 16 articles
Browse latest View live

The old Berkeley Postgres code

Some days ago, I was reading some patch from the in-progress commitfest, and happened to notice this comment in src/include/tcopprot.h: * This file was created so that other c files could get the two *...

View Article



Fixing foreign key deadlocks

I've been commissioned to work on foreign keys. More specifically, on the problem that when foreign keys are verified, they sometimes obtain locks that are stronger than really needed. This causes some...

View Article

Fixing foreign key deadlocks, part 2

In the previous article, I explained the problem with foreign key checks checks obtaining too strong of a lock, and promised that we would be attempting to fix it.Here is my proposal:Create a new...

View Article

Fixing foreign key deadlocks, part 2 revisited

While trying to implement SELECT FOR KEY LOCK at the lock manager level, I stumbled across the problem that I need to represent the lock faithfully in the lock manager's terms. And since I previously...

View Article

Automatically pulling into a committer's Git repository

I was a bit unhappy because I couldn't keep my "bare" Git repository up-to-date unattended — I needed to be at my workstation to be able to do a git fetch, because it needs my SSH passphrase.I didn't...

View Article


Fixing foreign key deadlocks submitted

A week ago, I submitted my patch to fix the foreign key lock problem. What I propose is almost exactly what was described in my previous blog posts, with a couple of differences.The first is that I...

View Article

Grant schema usage to 2500 users? No can do!

It all started with a help request from a someone on IRC: he has about 2500 roles, and all of them have been granted USAGE privileges on a schema. He went on to create a bunch more and grant the same...

View Article

Recovering a lost-and-found database

Last week, a company's only PostgreSQL database server suffered an UPS failure. When they found they couldn't connect to it afterwards, they calledCommand Prompt to investigate.The most important...

View Article


Image may be NSFW.
Clik here to view.

This is what table bloat looks like

I got curious about a bloat problem on a customer's system today. The statistics as calculated by normal tools/queries say that one of the tables is 2x bloated. Another table is 6x bloated. And so on....

View Article


An attempt at finding glaring btree problems

Some time ago, a customer came to us with a strange vacuuming problem. Their regular vacuum job would die with a message such as this one: vacuumdb: vacuuming of database "clint_app" failed: ERROR:...

View Article

Image may be NSFW.
Clik here to view.

PGCon 2011 Developer's Meeting picture

For those that are curious (and which for some reason don't follow the #pgcon tag at twitter), here's a picture of the attendees of Developer's Meeting.Back row, from left to right: Robert Haas, Selena...

View Article

Fixing foreign key deadlocks, part three

As I have posted in previous articles (Fixing foreign key deadlocks andPart 2), I am working on reducing the lock strength required by foreign key checks. I havea working patch that solves a lot of the...

View Article

Decoding infomasks

Come on, admit it: you've always wanted to display the infomask bits from a tuple header in a human-readable manner, but you've never gotten around to it and you still keep htup.h in display while you...

View Article


Another day, another recovery

This is something I have seen many times now: a customer calls us because they lost some data and they want help recovering.Now you must be wondering: surely if they lost data they can just recover...

View Article

The Write–Ahead Log

WAL (acronym for Write–Ahead Log) is the mechanism that Postgres uses to implement durability of data changes in the face of abrupt system crashes.The WAL system's central concept is that changes to...

View Article


... and that was my last day

This has been cooking for a while now, and now it's time to open it up: July 31st, 2012 was my last day with Command Prompt, Inc.I joined Command Prompt in October 2005. Back then I wasn't a very...

View Article
Browsing all 16 articles
Browse latest View live




Latest Images