issues with "PGCONNECT_TIMEOUT" environmental variable

168 Views Asked by At

I have attempted to utilize the PGCONNECT_TIMEOUT environment variable for testing purposes. I've configured this variable to have a value of 2 seconds and subsequently executed my test cases. However, it seems that the termination of the processes is not occurring even after the specified 2-second timeout. I am currently using PostgreSQL version 11.4.

I used the following command within a script:

export PGCONNECT_TIMEOUT=2

I then attempted to establish a connection to PostgreSQL using the same script. However, I observed that the script did not terminate even after the specified 2-second timeout.

To confirm the correctness of my approach, I also tested the timeout command within the PostgreSQL command line, and in this case, the process terminated as expected. I'm uncertain about what might be causing the issue in the script.

0

There are 0 best solutions below