I created a patch for PostgreSQL and x86 architecture.
This patch address a Opteron-specific
behavior regarding some assembler statements.
The patch based on a patch to PostgreSQL 8.0.3 which was worked out by
Tom did change src/include/storage/s_lock.h for PostgreSQL 8.1.x. This
change is only for x86_64. I need to compile PostgreSQL 8.1.4 for 32-bit
on a Opteron. The reason for the 32-bit binary is a failover/test box
with XEONs which didn't know anything about EM64T.
Anyhow, I change the i386 part of s_lock.h too.
BTW: Tom did a great job on BufMgrLock. The original patch for pg 8.0
did push the performance with many parallel queries on another level.
We did run internal benchmarks and the patch version was 2.5 times
faster. The benefit of this change to Pg 8.1.4 is much smaller. I did a
test with pg_bench and the benefit is at around 10 percent.
This change was tested on Opteron, XEON MP w/o EM64T and XEON DP without