Skip to main content
Last updated: Refreshed just now

Workers using pg library unable to parse Postgres database DSN

Started
Resolved

Timeline

  1. Resolved

    This incident has been resolved. Any impacted developers should update their npm dependencies to use wrangler@3.44.0 or newer, pg@8.11.5 or newer. (In the rare case when an application depends on pg-connection-string directly, this package should also be updated to version 2.6.4 or newer).

  2. Identified

    We have identified an incompatibility issue with the latest 2.6.3 version of the pg-connection-string library used by the node-postgres library and the Node.js polyfill used by the Workers runtime. This may also impact other libraries that require the Node.js "url" package. This will result in a runtime error related to the URL constructor with the text URL is not a constructor. A fix to the way this is polyfilled is in-progress. In the meantime, users can choose to downgrade to pg-connection-string version 2.6.2 and pg version 8.11.3, which does not import the "url" package.

  3. Updated

    We are continuing to investigate this issue.

  4. Investigating

    New Workers deployed using URI to parse a database (Data Search Name) DSN are failing to parse. We are currently investigating the root cause. This is also impacting newly deployed Hyperdrives ability to connect to databases.