Creating tables and indexes in autocommit mode #3631
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The CI tests are repeatedly running into issues where a deadlock kills the import during the stage where tables and indexes are created. From the Postgresql logs it looks like the deadlock is against the autovacuum process. According to the documentation this shouldn't be happening unless we have a forced transaction-id-wraparound vacuum. That seems rather unlikely after having only imported a small Liechtenstein extract.
Currently the create commands all run in a single connection. It might be that multiple sequential creates create a situation where autovacuum can't cancel itself anymore. At least that is the assumption in this PR. Hard to test. Lets see if the CI failures stop.