Index: src/backend/storage/file/fd.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/storage/file/fd.c,v retrieving revision 1.127 diff -u -r1.127 fd.c --- src/backend/storage/file/fd.c 5 Mar 2006 15:58:37 -0000 1.127 +++ src/backend/storage/file/fd.c 27 May 2006 16:54:36 -0000 @@ -46,6 +46,10 @@ #include #include +#ifdef __GLIBC__ +#include +#endif + #include "miscadmin.h" #include "access/xact.h" #include "storage/fd.h" @@ -1258,6 +1262,11 @@ { AllocateDesc *desc = &allocatedDescs[numAllocatedDescs]; +#ifdef __GLIBC__ + /* disable glibc braindamaged locking */ + __fsetlocking(file, FSETLOCKING_BYCALLER); +#endif + desc->kind = AllocateDescFile; desc->desc.file = file; desc->create_subid = GetCurrentSubTransactionId();