Postgres and Open Source Experts

Anytime. Anywhere. Since 1997.

Blog

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:

  1. Create a new SELECT locking clause. For now, we're calling it SELECT FOR KEY LOCK
  2. This will acquire a new type of lock in the tuple, dubbed a "keylock".
  3. This lock will conflict with DELETE, …

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 operations to block unnecessarily and, perhaps more aggravating, some other operations to deadlock.

This problem has been known for a very long time, and it affects many users to varying degrees. The most recent detailed discussion about this …

Node and Postgres

Or, two great tastes that work together. PostgreSQL Conference West was last week, and we will be looking at East 2011 in a few short months. I was fortunate enough to present a paper on Postgres.js, the driver I've been working on for Node.js for the past several months. I had a lot of great feedback in my talk, a lot of great questions, and even some immediate bug reports. …

Replication Poll results

Back before PostgreSQL Conference West, there was a poll. That poll was replication. Here are the results. There were 367 respondents. Have fun with it!

Qresponses
1In what waydo you use PostgreSQL?
Development Only72
As a hobby (or personaldevelopment)106
Professionally325
2What versionof PostgreSQL are you running?
8.3117
9.0175
8.250
8.136
8.4251
3Do you use or plan to use …

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
 *    function prototypes without having to include tcop.h which single
 *    handedly includes the whole f*cking tree -- mer 5 Nov. 1991

The weird thing about this was that there's no tcop.h file on the …

MySQL: The Elephant in the room (Facebook?), oh and me.

Rob Wultsch gave an interesting talk at PostgreSQL Conference West, about MySQL and why it doesn't suck. Yes, this was a talk we accepted at a PostgreSQL Conference. It was a good talk but some of the room was a little testy afterward.

Outside of Rob's points which I found valid (you can see it in the video) the one thing that bugged me is the aggressiveness of Facebook. It …

You still don't need no stinking replication! (Replication Poll)

So it appears my blog yesterday stirred a couple of coals. I love it. In response to Josh Berkus's comment here, I offered up a poll. So here it is: Replication Poll. You don't have to log in to take it but of course if you do, it helps track validity of results. Bring it on folks.

Users versus Customers - YOU DON'T NEED NO STINKING REPLICATION

I was catching up on the max_wal_senders must die thread and I came across this very interesting post by fellow Josh Berkus.

In the post, Josh Berkus makes the assertion, "50% of PGX's active clients have either already converted to 9.0 replication or have scheduled a conversion with us".

I have no doubts of Josh's statement but it brings up an interesting point when arguing about features in PostgreSQL. Josh's …

Are hump days, slow days? Wait ... what, No more Gnome for Ubuntu?

There are so many things to consider when working through the week. You never send a Press Release never on Monday or Friday. Scheduling meetings is always a bad idea on Monday. Thursdays always seem to be busy, probably because people want to be lazy on Friday. Monday you never know what is going to happen, you might get slammed or you might be waiting for the next email to …

INSERT..RETURNING in postgres.js

So as you all know, we've been working on postgres support for the up-and-coming node.js environment, and we just got a great new example of Postgres' functionality that we're proud to say we support - specifically, the query format INSERT..RETURNING. For those unfamiliar with INSERT..RETURNING, this type of query allows us to do just what it says - return a value, or set of values, after an INSERT statement. This …