Closed OleKsimov closed 1 year ago
/cc @cristhiank, @gastaldi, @geoand, @gsmet
This feature request is based on this issue
So this is a postgresql specific configuration?
I believe it's Flyway-specific property to choose what lock should be used: session or transactional. I would say some problems with default value (true = transactional advisory locks) appear because of Agroal connection pooling implementation. You can find a reproducer in the issue I mentioned before.
Yeah, but my point is that in Flyway this property seems to be PostgreSQL specific.
Yeah, you are right, it is obviously Postgres configuration property only.
I think this could be a blocker issue for some people running quarkus-flyway + postgres. As described in the links to flyway docs with "out of the box" flyway you can bypass this by setting a system property, however that doesn't seem to work with quarkus-flyway because there is no call to FluentConfiguration::configuration or ClassicConfiguration::configure from FlywayCreator::createFlyway.
I've tested setting the system property for dev mode / test lifecycle via maven configuration (quarkus-maven-plugin/configuration/systemProperties + maven-surefire-plugin/configuration/systemPropertyVariable) but that doesn't work due to the way the config is loaded in quarkus-flyway, i don't think there is any alternative workaround other than not upgrading quarkus :-(
Yeah, I think we'll need to provide the property. Do you agree @gsmet @gastaldi ?
Yup. Sounds like a good opportunity for a pull request :)
+1, this would be nice to have
I've added the good first issue
tag for anyone that wants to pick it up.
My advice would be to add a postgresql
config group then a property inside it to mimic the Flyway structure and be ready in case they add more.
Hi @geoand If it's not already taken care of, could I give this a try ?
@jcsim1024 go right ahead!
@jcsim1024 have a look at this comment before starting your work: https://github.com/quarkusio/quarkus/issues/28502#issuecomment-1277916719
Thanks!
@jcsim1024 just checking in, how is this going? Do you need any help?
hi all, i want to pick up this issue if you guys would not mind, I m new here and wanted to start contributing to quarkus,
Hi @piyush-1234,
Thanks for the offer. Let's see how far @jcsim1024 has got
thanks @geoand for taking me in consideration
Hello @geoand I am still reading the doc and trying to reproduce
@jcsim1024 The reproducer is present in this issue if it helps.
@geoand & @OleKsimov, I m working on this parallel. any suggestion?
Hello @geoand, I am following the "create a config group and then add a property" advice. I am trying to find an elegant way to configure PostgreSQLConfigurationExtension then I'll make the test work. Any suggestion is welcomed https://github.com/quarkusio/quarkus/compare/main...jcsim1024:quarkus:main
@jcsim1024 you should not have to populate the new config group, Quarkus will do that automatically, see this for more information.
Just to keep you up to date, I have not made a lot of progress this weekend , I've mostly read the documentation I'll try to have something working this sunday
Update: I now have a working config group
public Flyway createFlyway(DataSource dataSource)
I added the IT test in a module different than flyway's IT tests as it already has H2 database in it. Is it ok or should I put it in a a specific flyway-postgres IT module? @geoand
I think I should investigate more on the root cause of the stuck migration when there is both a tansaction lock and a concurent operation.
Hi guys! I just wanted to mention that this issue blocks the teams which use Flyway + Postgres. Is there anything that can be done to add priority to this issue? Two months are gone, and it would be critical to wait for another two :(
@jcsim1024 how is your work going? Do you need any help or should we perhaps take over?
Thanks
Sorry I did not had a lot of free time this last 2 weeks, I'll have look on the tests this weekend
Hello will add a maven submodule named postgres-extension in "integration-tests/flyway/" folder and move what's in it in h2-extension
@geoand Is it possible to assign this issue to someone?
As this does has the potential to block a lot of users and since we would not want to wait too much longer for a fix, I will handle it
With https://github.com/quarkusio/quarkus/pull/30656, users will now be able to provide arbitrary customization for Flyway, one of which can be the one needed for this issue.
I think this design is cleaner than adding a postgres specific property.
Description
Please consider adding new Flyway property to Quarkus configuration with default value set to "false" A discussion about this property and issue with its current default (true) value can be found here
Implementation ideas
No response