~ubuntu-branches/ubuntu/precise/postgresql-9.1/precise-security

« back to all changes in this revision

Viewing changes to src/include/port/linux.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* src/include/port/linux.h */
 
2
 
 
3
/*
 
4
 * As of July 2007, all known versions of the Linux kernel will sometimes
 
5
 * return EIDRM for a shmctl() operation when EINVAL is correct (it happens
 
6
 * when the low-order 15 bits of the supplied shm ID match the slot number
 
7
 * assigned to a newer shmem segment).  We deal with this by assuming that
 
8
 * EIDRM means EINVAL in PGSharedMemoryIsInUse().  This is reasonably safe
 
9
 * since in fact Linux has no excuse for ever returning EIDRM; it doesn't
 
10
 * track removed segments in a way that would allow distinguishing them from
 
11
 * private ones.  But someday that code might get upgraded, and we'd have
 
12
 * to have a kernel version test here.
 
13
 */
 
14
#define HAVE_LINUX_EIDRM_BUG
 
15
 
 
16
/*
 
17
 * Set the default wal_sync_method to fdatasync.  With recent Linux versions,
 
18
 * xlogdefs.h's normal rules will prefer open_datasync, which (a) doesn't
 
19
 * perform better and (b) causes outright failures on ext4 data=journal
 
20
 * filesystems, because those don't support O_DIRECT.
 
21
 */
 
22
#define PLATFORM_DEFAULT_SYNC_METHOD    SYNC_METHOD_FDATASYNC