Skip to content

[BUG] /channels/<id>/messages/_search fails intermittently on postgres after metadata change #458

Description

@mgaffigan

Repro:

  1. Deploy channel on pg mirthdb
  2. Make at least 5 calls to /channels/<id>/messages/_search to get the plan cached
  3. Change the type of the metadata
  4. Make the call to /channels/<id>/messages/_search again (repeatedly since it might be from a different pid)

Expected:

  • the call succeeds

Actual:

  • When the same pid is reused, the cache fails with HTTP 500
  • PG Server records this error:
2026-09-21 04:51:50.195 UTC [79] ERROR:  cached plan must not change result type
2026-09-21 04:51:50.195 UTC [79] STATEMENT:  SELECT *
                        FROM D_MCM1
                        WHERE MESSAGE_ID = $1
                        AND METADATA_ID = $2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions