Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

pgloader

$ pgloader Community High Risk
Dimitri Fontaine · Database & Data · PostgreSQL · macos / linux

pgloader migrates schemas and streams bulk data into PostgreSQL using COPY from MySQL, SQLite, MS SQL, DBF, or CSV/fixed-width files. Load scripts (.load) can be validated ahead of execution with pgloader --dry-run, though stdout output is summary text rather than JSON.

FCRS-1.0 Score
77 /100
Good
Medium Confidence
Zero-Friction Install
brew install pgloader
CLI vs MCP Decision CLI Only

pgloader streams multi-gigabyte COPY pipelines directly between local files/source DBs and PostgreSQL; MCP is unsuitable for bulk ETL.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

Runs non-interactively with --dry-run, --quiet, and --verbose, but reports summary tables in plain text rather than --json.

  • Supports --dry-run and --quiet; text summary output only
Trust & Safety 20 / 25

--dry-run validates scripts and DB connections without mutating targets, though .load scripts using include drop are destructive.

  • Native --dry-run check; include drop clause can drop target tables
Setup & Portability 11 / 15

Installable via brew install pgloader and Linux distro packages, though building from source requires SBCL Common Lisp.

  • Available via Homebrew and apt; SBCL dependency if compiled from source
Utility & Efficiency 14 / 15

Dramatically faster and more resilient than custom scripts for heterogeneous MySQL/SQLite/CSV-to-PostgreSQL migrations.

  • Automated type casting and multi-threaded PostgreSQL COPY streaming
Maintenance & Lineage 7 / 10

Widely adopted community tool (dimitri/pgloader) under the PostgreSQL License, though release cadence is modest.

  • Mature open-source project (dimitri/pgloader)
Docs & Verifiability 8 / 10

Detailed DSL and CLI flag documentation on pgloader.readthedocs.io.

  • Comprehensive command reference on Read the Docs

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Connection strings live in .load DSL scripts or CLI URI arguments (mysql://..., postgresql://...); supports ~/.pgpass and PGPASSWORD.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

100% free under the permissive PostgreSQL License.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# pgloader Agent Rules
- Always run `pgloader --dry-run --verbose <script.load>` before executing a `.load` script.
- Check `WITH include drop` in `.load` files—it drops target Postgres tables before loading.
- Store DB passwords in `~/.pgpass` or `PGPASSWORD` rather than committing them in `.load` scripts.

Agent-Ready Command Recipes

Safe Read-Only Queries

Dry-run a .load migration script
pgloader --dry-run --verbose migration.load

Parses the load script and tests source/target DB connectivity without writing data.

Controlled Writes & Previews

Load a local SQLite database into PostgreSQL
pgloader --quiet app.sqlite postgresql://postgres@localhost:5432/app

Migrates schema and streams table rows from app.sqlite into a local PostgreSQL database.

Strengths for Agents

  • + --dry-run validates .load syntax and database connectivity before moving data.
  • + Handles MySQL/SQLite-to-PostgreSQL type mapping and parallel COPY out of the box.

Caveats & Pitfalls

  • ! No --json output mode for parsing row counts or per-table error summaries.
  • ! Source builds rely on SBCL Common Lisp and can lag behind newer MySQL 8 auth plugins without SSL/auth tweaks.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI