Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadlock in PostgreSQL 12 #2634

Closed
romash1408 opened this issue Jan 20, 2020 · 3 comments
Closed

Deadlock in PostgreSQL 12 #2634

romash1408 opened this issue Jan 20, 2020 · 3 comments

Comments

@romash1408
Copy link
Contributor

@romash1408 romash1408 commented Jan 20, 2020

Flyway version: 6.1.4 (API)
DB version: PostgreSQL 12.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.2.0, 64-bit

This code is calling flyway on start up:

Flyway flyway = Flyway.configure()
        .baselineOnMigrate(true)
        .dataSource(dataSource())
        .load();
flyway.migrate();

Then flyway tries to lock table, but it fails on this line


because rs.getString("pg_try_advisory_lock") returns true, so we've got infinite loop

@juliahayward
Copy link
Member

@juliahayward juliahayward commented Jan 20, 2020

This is somewhat unexpected as the documentation claims Postgres always emits t or f - see https://www.postgresql.org/docs/current/datatype-boolean.html - however your PR makes the code better in any case. Thankyou!

@romash1408
Copy link
Contributor Author

@romash1408 romash1408 commented Jan 20, 2020

Potential fix #2635

@juliahayward
Copy link
Member

@juliahayward juliahayward commented Jan 20, 2020

Possibly related to #2506.

juliahayward added a commit that referenced this issue Jan 20, 2020
@alextercete alextercete added this to the Flyway 6.2 milestone Jan 22, 2020
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants