$npx skillfedfor your agent

django-pgmigrate

Avoid costly downtime during Postgres migrations.

With conditionsPyPI DatabaseReleased Nov 2025989.6K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_pgmigrate-1.6.0-py3-none-any.whl
v1.6.0 · released 2025-11-30 · Python <4,>=3.10.0 · 2 runtime deps: django, django-pglock

Yes, if you run Django on Postgres and want to reduce migration downtime. The package is straightforward to install, has no security vulnerabilities, and solves a real operational problem. The aging maintenance status is a minor concern but not a blocker—the codebase is stable and compatible with current versions. Install it if migration locking is a pain point; skip it if you use other databases or have short, non-blocking migrations.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django 4.2–6.0, Python 3.10–3.14, Postgres 14–18, and Psycopg 2–3.
  • Low friction install with a pure Python wheel.
  • Maintenance status is aging—last commit was 2025-11-30 and the project has 28 stars—but the package remains actively maintained and compatible with current Django and Python versions.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause is permissive and poses no restriction on commercial or private use.

last release 2025-11-30 (257 days) · last repo commit 2025-11-30 · 28 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 989,583 downloads/mo, #4,566 on PyPI

Verify before relying

pip install django-pgmigrate

# Add to Django INSTALLED_APPS:
# 'pgactivity', 'pglock', 'pgmigrate'

python manage.py migrate
  • Whether automatic query termination is safe for all workload types or if manual inspection is recommended in production.
  • Performance impact of blocking-query detection during large migration batches.
Same gist for agents: .md · .json

What it is and what it does

django-pgmigrate is a Django management command wrapper that solves a common Postgres migration problem: when long-running transactions hold locks, subsequent migrations queue behind them and block all queries on the affected model. The package detects these blocking queries and either terminates them automatically (the default) or prints them for manual review. It also supports setting lock timeouts to cancel migrations that block too long.

The package integrates into Django's standard migrate command and requires adding three apps to INSTALLED_APPS. It works with Django 4.2–6.0, Python 3.10–3.14, and Postgres 14–18, making it compatible with modern Django deployments. The two runtime dependencies are django and django-pglock.

Use it for

  • Automatically terminate blocking queries during production migrations to prevent cascading locks.
  • Inspect and manually manage blocking activity instead of auto-terminating for workloads requiring careful query control.
  • Set lock timeouts to fail fast if a migration blocks longer than a configured threshold.
  • Monitor Postgres process IDs during migrations to correlate blocking activity with application logs.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you run Django on Postgres and want to reduce migration downtime.

The package is straightforward to install, has no security vulnerabilities, and solves a real operational problem. The aging maintenance status is a minor concern but not a blocker—the codebase is stable and compatible with current versions. Install it if migration locking is a pain point; skip it if you use other databases or have short, non-blocking migrations.

Install

django-pgmigrate on PyPI

Before you install

Low friction install with a pure Python wheel. Maintenance status is aging—last commit was 2025-11-30 and the project has 28 stars—but the package remains actively maintained and compatible with current Django and Python versions.

Requires Django 4.2–6.0, Python 3.10–3.14, Postgres 14–18, and Psycopg 2–3.

License in practice

BSD-3-Clause is permissive and poses no restriction on commercial or private use.

Quickstart

pip install django-pgmigrate

# Add to Django INSTALLED_APPS:
# 'pgactivity', 'pglock', 'pgmigrate'

python manage.py migrate

Verify before relying

  • Whether automatic query termination is safe for all workload types or if manual inspection is recommended in production.
  • Performance impact of blocking-query detection during large migration batches.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release <4,>=3.10.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
djangodjango-pglock
MaintenanceAging 257 days since the last release
Last repo commit
First released
Downloads989,583 / month, #4,566 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Framework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: django_pgmigrate-1.6.0-py3-none-any.whl

Tags

Capabilities
postgres migration lockingdjango migration blocking queriesavoid migration downtimepostgres lock timeoutdjango database migration safety
Topics
django-opspostgres-migrations

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “postgres migration locking”

Give your agent the search over MCP, or paste the wish link into any chat.

More Database packages

psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
redis Worth it
PyPI · Database · released Jul 2026

Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.

Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.

MITpure Python · 3.10+
268.3Mdownloads / mo
ydb Worth it
PyPI · Database · released Jul 2026

YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.

Install it if you need to connect Python applications to YDB databases.

permissive licensepure Python · 3.10+
210.0Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
sqlparse Worth it
PyPI · Software Development · released Aug 2026

sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.

Install it if you need to manipulate, format, or analyze SQL text programmatically.

BSD-3-Clausepure Python · 3.10+
148.9Mdownloads / mo
dbt-adapters With conditions
PyPI · Database · released Jul 2026

Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.

Apache-2.0pure Python · 3.10.0+
121.3Mdownloads / mo

See also django-pg-zero-downtime-migrations · django-pglock · django-safemigrate · django-pg-migration-tools · django-linear-migrations · django-read-only · django-pgactivity · squawk-cli · django-migration-linter · django-sequences