ndan

ndan

Concurrent index migration fails on partitioned oban_jobs

Oban.Pro.Migration.up(version: "1.7.0", only: :indexes) fails on partitioned oban_jobs table when upgrading Oban Pro from 1.6 to 1.7

defmodule App.Repo.Migrations.UpgradeObanProTo17Indexes do
  use Ecto.Migration

  @disable_migration_lock true
  @disable_ddl_transaction true

  def up, do: Oban.Pro.Migration.up(version: "1.7.0", only: :indexes)
  def down, do: Oban.Pro.Migration.down(version: "1.7.0", only: :indexes)
end
15:38:26.974 [info] create index if not exists public.oban_jobs_workflow_index
** (Postgrex.Error) ERROR 0A000 (feature_not_supported) cannot create index on partitioned table "oban_jobs" concurrently
    (ecto_sql 3.14.0) lib/ecto/adapters/sql.ex:1121: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.19.5) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2

The non-concurrent migration (without only: :indexes) works fine.

Most Liked

sorentwo

sorentwo

Oban Core Team

There are many unexpected edge cases with partitioned tables in Postgres. That’s one of the numerous reasons we’ve deprecated DynamicPartitioner as of Pro v1.7:

This module is deprecated. The complexity and edge cases introduced by dynamic partitioning outweigh the benefits for most applications. This plugin will be removed in a future version.

Note that “future version” means v2.0, we won’t remove something functional in a minor release, but you may encounter weirdness with things like concurrent migrations.

Where Next?

Popular in Troubleshooting Top

rayex
When I compile hex package io_ansi_plus, I get error “Codepoint failed”. Why? and why are the “Got:” and “Hint:” codepoints identical? It...
New
ChrisAmelia
Currently reading and experimenting through, which is in 1.6 Chapter 7: Sign up | Phoenix Tutorial (Phoenix 1.6) | Softcover.io In regar...
New
bugnano
Hello everyone. I’m the author of GitHub - bugnano/wtransport-elixir: Elixir bindings for the WTransport WebTransport library · GitHub ,...
New
hyperoceanic
Having read the book, I’m keen to explore Ash a bit more, but I’m falling at the first hurdle - the creation of a new project. Here’s my...
New
Lotoen
Hello, I am currently using Elixir 1.18.4 and OTP 27 with Linux Mint 22.3 - Cinnamon 64-bit as my operating system. I came across this er...
New
tellemiller
We recently started running Oban with Oban Web on PostgreSQL (AWS RDS gp3) and noticed our oban_jobs buffer cache hit ratio sitting at 65...
New
AstraLuma
Experienced programmer writer her first Elixir, and maybe bit off more than she can chew? I’m trying to start two GenServers, where the ...
New
rayex
For hex package islands_score the source @spec for function format/2 is as such: @spec format(t, keyword) :: :ok Why does it show on 4 ...
New
Lotoen
Hi, I’m on Linux Mint 22.3 - Cinnamon 64-bit, and I encountered an error when trying to build an elixir phoenix container 577.1 Reading...
New
ndan
Oban.Pro.Migration.up(version: "1.7.0", only: :indexes) fails on partitioned oban_jobs table when upgrading Oban Pro from 1.6 to 1.7 def...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement