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

fork_process.c

  • Heikki Linnakangas's avatar
    680513ab
    Break out OpenSSL-specific code to separate files. · 680513ab
    Heikki Linnakangas authored
    This refactoring is in preparation for adding support for other SSL
    implementations, with no user-visible effects. There are now two #defines,
    USE_OPENSSL which is defined when building with OpenSSL, and USE_SSL which
    is defined when building with any SSL implementation. Currently, OpenSSL is
    the only implementation so the two #defines go together, but USE_SSL is
    supposed to be used for implementation-independent code.
    
    The libpq SSL code is changed to use a custom BIO, which does all the raw
    I/O, like we've been doing in the backend for a long time. That makes it
    possible to use MSG_NOSIGNAL to block SIGPIPE when using SSL, which avoids
    a couple of syscall for each send(). Probably doesn't make much performance
    difference in practice - the SSL encryption is expensive enough to mask the
    effect - but it was a natural result of this refactoring.
    
    Based on a patch by Martijn van Oosterhout from 2006. Briefly reviewed by
    Alvaro Herrera, Andreas Karlsson, Jeff Janes.
    680513ab
    History
    Break out OpenSSL-specific code to separate files.
    Heikki Linnakangas authored
    This refactoring is in preparation for adding support for other SSL
    implementations, with no user-visible effects. There are now two #defines,
    USE_OPENSSL which is defined when building with OpenSSL, and USE_SSL which
    is defined when building with any SSL implementation. Currently, OpenSSL is
    the only implementation so the two #defines go together, but USE_SSL is
    supposed to be used for implementation-independent code.
    
    The libpq SSL code is changed to use a custom BIO, which does all the raw
    I/O, like we've been doing in the backend for a long time. That makes it
    possible to use MSG_NOSIGNAL to block SIGPIPE when using SSL, which avoids
    a couple of syscall for each send(). Probably doesn't make much performance
    difference in practice - the SSL encryption is expensive enough to mask the
    effect - but it was a natural result of this refactoring.
    
    Based on a patch by Martijn van Oosterhout from 2006. Briefly reviewed by
    Alvaro Herrera, Andreas Karlsson, Jeff Janes.