Header And Logo

PostgreSQL
| The world's most advanced open source database.

linux.h

Go to the documentation of this file.
00001 /* src/include/port/linux.h */
00002 
00003 /*
00004  * As of July 2007, all known versions of the Linux kernel will sometimes
00005  * return EIDRM for a shmctl() operation when EINVAL is correct (it happens
00006  * when the low-order 15 bits of the supplied shm ID match the slot number
00007  * assigned to a newer shmem segment).  We deal with this by assuming that
00008  * EIDRM means EINVAL in PGSharedMemoryIsInUse().  This is reasonably safe
00009  * since in fact Linux has no excuse for ever returning EIDRM; it doesn't
00010  * track removed segments in a way that would allow distinguishing them from
00011  * private ones.  But someday that code might get upgraded, and we'd have
00012  * to have a kernel version test here.
00013  */
00014 #define HAVE_LINUX_EIDRM_BUG
00015 
00016 /*
00017  * Set the default wal_sync_method to fdatasync.  With recent Linux versions,
00018  * xlogdefs.h's normal rules will prefer open_datasync, which (a) doesn't
00019  * perform better and (b) causes outright failures on ext4 data=journal
00020  * filesystems, because those don't support O_DIRECT.
00021  */
00022 #define PLATFORM_DEFAULT_SYNC_METHOD    SYNC_METHOD_FDATASYNC