aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeFunctionscan.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2022-11-22 10:35:04 -0500
committerAndrew Dunstan <andrew@dunslane.net>2022-11-22 10:52:24 -0500
commit4b9013d64f231ddbadd2b06cf75499c8e8cd4cc1 (patch)
tree80a18e3106207e5ca9253ab5ec65d96ae40c334e /src/backend/executor/nodeFunctionscan.c
parent36eeb37cd611c0a0bfb5743d9ddbef8f04fc87f3 (diff)
downloadpostgresql-4b9013d64f231ddbadd2b06cf75499c8e8cd4cc1.tar.gz
postgresql-4b9013d64f231ddbadd2b06cf75499c8e8cd4cc1.zip
Prevent port collisions between concurrent TAP tests
Currently there is a race condition where if concurrent TAP tests both test that they can open a port they will assume that it is free and use it, causing one of them to fail. To prevent this we record a reservation using an exclusive lock, and any TAP test that discovers a reservation checks to see if the reserving process is still alive, and looks for another free port if it is. Ports are reserved in a directory set by the environment setting PG_TEST_PORT_DIR, or if that doesn't exist a subdirectory of the top build directory as set by Makefile.global, or its own tmp_check directory. The prove_check recipe in Makefile.global.in is extended to export top_builddir to the TAP tests. This was already exported by the prove_installcheck recipes. Per complaint from Andres Freund Backpatched from 9b4eafcaf4 to all live branches Discussion: https://postgr.es/m/20221002164931.d57hlutrcz4d2zi7@awork3.anarazel.de
Diffstat (limited to 'src/backend/executor/nodeFunctionscan.c')
0 files changed, 0 insertions, 0 deletions