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
    src/test/kerberos and src/test/ldap need to run a private authentication
    server of the relevant type, for which they need a free TCP port.
    They were just picking a random port number in 48K-64K, which works
    except when something's already using the particular port.  Notably,
    the probability of failure rises dramatically if one simply runs those
    tests in a tight loop, because each test cycle leaves behind a bunch of
    high ports that are transiently in TIME_WAIT state.
    
    To fix, split out the code that PostgresNode.pm already had for
    identifying a free TCP port number, so that it can be invoked to choose
    a port for the KDC or LDAP server.  This isn't 100% bulletproof, since
    conceivably something else on the machine could grab the port between
    the time we check and the time we actually start the server.  But that's
    a pretty short window, so in practice this should be good enough.
    
    Back-patch to v11 where these test suites were added.
    
    Patch by me, reviewed by Andrew Dunstan.
    
    Discussion: https://postgr.es/m/3397.1564872168@sss.pgh.pa.us
    4844c630
    History
    Name Last commit Last update