Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

postgres-lambda-diff

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Tom Lane authored
    On Linux, shared memory segments created with shm_open() are backed by
    swap files created in tmpfs.  If the swap file needs to be extended,
    but there's no tmpfs space left, you get a very unfriendly SIGBUS trap.
    To avoid this, force allocation of the full request size when we create
    the segment.  This adds a few cycles, but none that we wouldn't expend
    later anyway, assuming the request isn't hugely bigger than the actual
    need.
    
    Make this code #ifdef __linux__, because (a) there's not currently a
    reason to think the same problem exists on other platforms, and (b)
    applying posix_fallocate() to an FD created by shm_open() isn't very
    portable anyway.
    
    Back-patch to 9.4 where the DSM code came in.
    
    Thomas Munro, per a bug report from Amul Sul
    
    Discussion: https://postgr.es/m/1002664500.12301802.1471008223422.JavaMail.yahoo@mail.yahoo.com
    17506122
    History
    Name Last commit Last update