-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Skip postgres restart on first run #1232
Comments
See #929 (comment) for somewhere I was answering something else recently, but I think my explanation there is probably helpful for explaining why what you're asking for isn't something we can reasonably accomplish with stock PostgreSQL, specifically:
|
FWIW, now #1150 means this is pretty easy to accomplish in a slightly more esoteric way -- use that script in a Kubernetes |
(there's still a "restart" there, but it's a cleaner one at a higher platform level, not in a single container) |
For greater speed with testcontainer, it would be much faster to run the migration in an image build and store that result in a registry |
Hi, we are using docker images with testcontainers. Each time new container is created, the db is initialized, migration scripts are applied and postgres server is restarted, adding around 25-50% startup time of whole container. This multiplied by hundred containers adds unnecessarily few hundred seconds. I've conducted some tests with pre-initialized database and the startup time significantly dropped, but that's really tricky to be done.
Any chance we could get a optimization setting for tests, to skip this server restart?
The text was updated successfully, but these errors were encountered: