search_path is not restored after migration #737
We are using Flyway 2.3 with PostgreSQL 8.0.2, although the issue should apply to other versions of PostgreSQL as well. Basically, Flyways checkout a Connection from our pooled DataSource with the search_path defined as "$user, public" but then checks it in after migration with a search_path defined as "public, X, $user, public", where X is the schema we wanted to migrate.
This is problematic for us when we want to migrate another schema, say Y, and Flyway checkout that same Connection AFTER the schema X as been dropped. It then tries to append Y to the search_path resulting in a PSQLException stating that the schema X does not exist anymore. The migration of schema Y then fails.
I believe this behavior comes from the fix for #374
The text was updated successfully, but these errors were encountered:
I have had the same problem as mapoulin described and stumbled on this issue. I'm using a callback to clean up the search_path while waiting for 4.0.
I just wanted to let you know that it also (perhaps obviously) happens with Redshift (as the RedshiftDBSupport is virtually the same as PostgresDLSupport).