I would like to test the behaviour of a program which executes queries to a PostgreSQL server in case of a query timeout.
How could I simulate that?
I would like to test the behaviour of a program which executes queries to a PostgreSQL server in case of a query timeout. How could I simulate that? |
|||
If you are just trying to simulate a timeout on your application side you could just use a dummy query like:
Where If you want to never come back from a query just run the above and kill the database.
This would also simulate a query timeout I believe. |
|||
|
How are you simulating the successful queries? You should be able to use the same mechanism, but return |
|||
|
statement_timeout
? Or do you mean a TCP/IP timeout due to connection loss? Quite different behaviour. – Craig Ringer Jul 22 at 3:41