aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-03-07 13:09:16 -0500
committerAndres Freund <andres@anarazel.de>2025-03-07 13:09:16 -0500
commit71d1ed6fe129935ce2764c5d34924512ed046f69 (patch)
tree8d00a22e66e01eb7089c4589c5b3d179792ef274 /src/tutorial/basics.source
parentd3fc7a51208b3f4f2be2476d44aa2542f52879de (diff)
downloadpostgresql-71d1ed6fe129935ce2764c5d34924512ed046f69.tar.gz
postgresql-71d1ed6fe129935ce2764c5d34924512ed046f69.zip
tests: Fix race condition in postmaster/002_connection_limits
The test occasionally failed due to unexpected connection limit errors being encountered after having waited for FATAL errors on another connection. These spurious failures were caused by the the backend reporting FATAL errors to the client before detaching from the PGPROC entry. Adding a sleep(1) before proc_exit() makes it easy to reproduce that problem. To fix the issue, add a helper function that waits for postmaster to notice the process having exited. For now this is implemented by waiting for the DEBUG2 message that postmaster logs in that case. That's not the prettiest fix, but simple. If we notice this problem elsewhere, it might be worthwhile to make this more general, e.g. by adding an injection point. Reported-by: Tomas Vondra <tomas@vondra.me> Diagnosed-by: Heikki Linnakangas <hlinnaka@iki.fi> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Tomas Vondra <tomas@vondra.me> Discussion: https://postgr.es/m/ggflhkciwdyotpoie323chu2c2idpjk5qimrn462encwx2io7s@thmcxl7i6dpw
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions