zonkyio / embedded-postgres

Java embedded PostgreSQL component for testing
Apache License 2.0
341 stars 41 forks source link

File lock not released when DB startup fails #134

Open todkuro opened 3 months ago

todkuro commented 3 months ago

version: 2.0.6, 2.0.7

When trying to use embedded-postgres from an IDE such as IntelliJ via Gradle, if the DB fails to start, the file lock is not released and the IDE must be restarted. EmbeddedPostgres handles the DB startup process in the constructor. If for some reason the DB fails to start and you get a "Gave up waiting for server..." error, there is no recovery method other than restarting the IDE.

tomix26 commented 3 months ago

Is the reported issue really related just to versions 2.0.6 and 2.0.7? Because I think no changes were made that could affect the locking mechanism in those specific versions. Could you also please provide a log from the moment just before the IDE freezes? That would help me find the problem more quickly.