diff --git a/modules/postgres/postgres.go b/modules/postgres/postgres.go index 3cb18e5df9..8986935bb0 100644 --- a/modules/postgres/postgres.go +++ b/modules/postgres/postgres.go @@ -275,10 +275,11 @@ func (c *PostgresContainer) execCommandsSQL(ctx context.Context, cmds ...string) func (c *PostgresContainer) snapshotConnection(ctx context.Context) (*sql.Conn, func(), error) { // Connect to the database "postgres" instead of the app one c2 := &PostgresContainer{ - Container: c.Container, - dbName: "postgres", - user: c.user, - password: c.password, + Container: c.Container, + dbName: "postgres", + user: c.user, + password: c.password, + sqlDriverName: c.sqlDriverName, } // Try to use an actual postgres connection, if the driver is loaded