# Postgrex: cryptic warning message

**URL:** <https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798>\
**Category:** Questions\
**Tags:** ecto, postgres, postgrex, postgresql\
**Created:** [January 30, 2019, 6:32pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798 "2019-01-30T18:32:54Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [January 30, 2019, 6:32pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/1 "2019-01-30T18:32:54Z")

</div>

Hey everybody, in our CI we regularly get this message while `MIX_ENV=test mix ecto.migrate` is executing:

> %Postgrex.Query{columns: nil, name: “ecto\_512389”, param\_formats: nil, param\_oids: nil, param\_types: nil, ref: #reference\<0.3268973948.3458203652.198652\>, result\_formats: nil, result\_oids: nil, result\_types: nil, statement: “_stripped_”, types: nil} uses unknown oid `20031` causing bootstrap

(The `statement` above is an UPDATE with a condition.)

I also regularly get the message when I drop and re-create my local test DB and then run migrations on it.

I poked around the net but the idea of Postgres OIDs doesn’t seem to apply to our app at all. I `grep`-ed all our migrations but couldn’t find anything about OIDs either.

Anybody has an idea? It’s a warning that doesn’t break anything but since it occurs regularly, it piqued my interest.

---

<div class="post-metadata">

**Author:** ![sanswork](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sanswork/32/39354_2.png) [@sanswork](https://forum.elixirforum.com/u/sanswork)\
**Post date:** [January 30, 2019, 7:09pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/2 "2019-01-30T19:09:28Z")

</div>

Not sure if you’ve seen it in your searches already but the postgrex readme has some discussion about their use of oids and some considerations around ints that might be relevant?

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [January 30, 2019, 8:41pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/3 "2019-01-30T20:41:49Z")

</div>

I did, but it says absolutely nothing to me. The only thing OID-related to our DB is the fact that PG still gives OIDs to our tables (automatically) but we haven’t configured any table to use OIDs inside them.

---

<div class="post-metadata">

**Author:** ![sanswork](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sanswork/32/39354_2.png) [@sanswork](https://forum.elixirforum.com/u/sanswork)\
**Post date:** [January 30, 2019, 9:10pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/4 "2019-01-30T21:10:49Z")

</div>

Any way you can post the contents of statement with maybe the data stripped but the query intact?

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [January 30, 2019, 9:22pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/5 "2019-01-30T21:22:41Z")

</div>

Come to think of it, it’s not something compromising anyway:

> UPDATE "debits" AS d0 SET "counterparty" = $1 WHERE (d0."type" = ‘customer\_charge\_recoupment’)

---

<div class="post-metadata">

**Author:** ![josevalim](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/32/1787_2.png) [@josevalim](https://forum.elixirforum.com/u/josevalim)\
**Post date:** [January 30, 2019, 9:29pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/6 "2019-01-30T21:29:49Z")

</div>

Any chance you have migrations or anything changing the DB schema running as you run your suite?

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [January 30, 2019, 9:41pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/7 "2019-01-30T21:41:11Z")

</div>

It’s possible. There are quite a few of them and I am not quite caught up with them just yet.

For now I am aware that we add, remove and add values to enums on several places. No materialized views or views of any kind. No stored procedures.

---

<div class="post-metadata">

**Author:** ![josevalim](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/32/1787_2.png) [@josevalim](https://forum.elixirforum.com/u/josevalim)\
**Post date:** [January 30, 2019, 9:42pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/8 "2019-01-30T21:42:39Z")

</div>

> [@dimitarvp](#):
>
> For now I am aware that we add, remove and add values to enums on several places. No materialized views or views of any kind. No stored procedures.

That may be the root cause. If you change the database structure, then whatever Postgres has cached will fail. But this should only happen if they are changed while the suite runs.

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [January 30, 2019, 9:44pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/9 "2019-01-30T21:44:29Z")

</div>

I am not excluding possible races. I happen to see the message only while migrating a freshly created test DB though, not during `mix test`. (Not sure if you implied that by saying “suite”.)

Is the error message serious? I honestly can’t say even after searching for PG OIDs for a while.

---

<div class="post-metadata">

**Author:** ![josevalim](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/32/1787_2.png) [@josevalim](https://forum.elixirforum.com/u/josevalim)\
**Post date:** [January 30, 2019, 11:12pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/10 "2019-01-30T23:12:09Z")

</div>

Right, so it is happening because you are doing queries while you run your migrations. So Postgrex needs to update the cached data as it goes.

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [January 31, 2019, 11:00am UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/11 "2019-01-31T11:00:53Z")

</div>

Does that mean that Postgrex is simply rebooting its supervision tree? Because if it caches types as a performance optimization technique, I am guessing it will have to reboot _something_ after they change?

---

<div class="post-metadata">

**Author:** ![josevalim](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/32/1787_2.png) [@josevalim](https://forum.elixirforum.com/u/josevalim)\
**Post date:** [January 31, 2019, 12:45pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/12 "2019-01-31T12:45:04Z")

</div>

More like updating the state of multiple connections. I believe everything happens without restarting the tree.

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [January 31, 2019, 12:57pm UTC](https://forum.elixirforum.com/t/postgrex-cryptic-warning-message/19798/13 "2019-01-31T12:57:23Z")

</div>

I see. So this is a warning message, not an error condition.
