ADF using the new Postgresql connector is sometimes getting the error: Message=Could not load type 'NpgsqlTypes.NpgsqlInterval' from assembly 'Npgsql, Version=4.0.9.2. This has been running without error for months.

JB 196 Reputation points
2025-04-04T14:46:39.0466667+00:00

We have been using the new ADF Postgresql connector for months without issue but in the last ELT we are getting the error: Message=Could not load type 'NpgsqlTypes.NpgsqlInterval' from assembly 'Npgsql, Version=4.0.9.2.

We are able to successfully extract data from some tables but not others. No ADF changes have been made recently. Is this something that we need to update in ADF, or needs to be updated in the source PostgreSQL databases? I am unsure what the error means and how to fix.

Thank you!

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

Accepted answer
  1. Pranab Bijoypuri 80 Reputation points
    2025-04-09T17:21:04.3+00:00

    I am also facing the similar issue. Here is my issue.

    • Problem: I am using the PostgreSQL connector to connect to the on-premises PostgreSQL database. It was working fine and suddenly the connector giving us the problem(Message=Could not load type 'NpgsqlTypes.NpgsqlInterval' from assembly 'Npgsql, Version=4.0.9.2).
    • Solution: In analysis I found that self-hosted integration run-time(IR) has been updated and problem started after that. I have restarted the self-hosted runtime from the server node. Now it is running perfectly fine.
    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Harrie Kierkels 0 Reputation points
    2025-04-08T09:50:09.51+00:00

    We had the same problem with all PostgreSQL tables in combination with SHIR 5.48.9106.2.
    In ADF you can choose between two connectors: "Azure Database for PostgreSQL" and "PostgreSQL".

    We've used the last one but we now switched to "Azure Database for PostgreSQL" and that solved our problem!

    2025-04-08 11_42_59-screenshot

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.