pgreplay icon indicating copy to clipboard operation
pgreplay copied to clipboard

connection to database failed for a specific session

Open mohammed-misran opened this issue 2 years ago • 1 comments

Hi I have a "replay file" that was generated using the pgreplay -f command. But when I try to replay the statements against the DB, the connection to DB fails at a specific session and the test halts.

This is the error message:

Starting database connection for session <session_id>
Error: connection to database failed: could not translate host name "<the_db_host>" to address: System error

Entering replay_free
Leaving replay_free
Leaving database_consumer
Entering file_provider_finish
Leaving file_provider_finish
Entering database_consumer_finish
Error: not all database connections closed
Leaving database_consumer_finish

The connection to DB was successful when using the psql command, but it fails during pgreplay. I'm not sure why the DB connection is failing for one particular session.

Can anyone help me identify the cause of this problem?

mohammed-misran avatar Aug 01 '22 08:08 mohammed-misran

Strange.

  • If you run it with strace -s 1000, can you show the line that causes the error?

  • Try to run it with -d 2, when you should see "Database connect string" debug messages. Does the connect string look right? Can you show the relevant part of the output before the error happens?

laurenz avatar Aug 16 '22 14:08 laurenz