Skip to content

Increase ecto pool size for running migrations #2258

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

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

blatyo
Copy link
Contributor

@blatyo blatyo commented Oct 3, 2017

closes #2256

This will fix the immediate issue. In addition, Ecto should probably warn when the pool size is too small or capture the connection checkout error and suggest increasing the pool size.

Verified

This commit was signed with the committer’s verified signature.
lunny Lunny Xiao
@fishcakez
Copy link
Member

fishcakez commented Oct 3, 2017

I understand that we need to default to at least 2 connection processes because we are using at least 2 connections, but why are we not using just 1?

@josevalim
Copy link
Member

@fishcakez it is because we need one transaction to hold the lock and another transaction to run the migrations. The reason we cannot do everything in one transaction is because some commands like ALTER TYPE cannot be run on a transaction, so the migration needs the ability to control what happens in a transaction and what does not.

@josevalim josevalim merged commit 42d47a6 into elixir-ecto:master Oct 3, 2017
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

bartekupartek pushed a commit to bartekupartek/ecto that referenced this pull request Mar 19, 2019

Verified

This commit was signed with the committer’s verified signature.
lunny Lunny Xiao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot run migrations with latest git
3 participants