Draft PostgreSQL 13 Release Notes

A draft release of the PostgreSQL 13 release notes is available. Notable changes include:

The pg_bench utility is one way to measure the performance of a new version of PostgreSQL (it has been improved to benchmark partitions). Your actual systems that run on PostgreSQL would need to be benchmarked separately.

See also: PostgreSQL Books

Using PostgreSQL with Django on a Mac

PostgreSQL on Mac via Brew

  • A quick and easy way of using PostgreSQL on Mac OS is to install it via Brew.
  • pgAdmin 4 provides a web interface for administering PostgreSQL and can be installed on a local developer machine.

    Django Migrations are Optional

    Django migrations are optional, and if you have difficulties with migrations there is a manual alternative, which can be preferable for some developers:

  • Create a schema.sql file which maintains all tables for your schema that you create (skip the tables automatically created by Django for user management).
  • Add schema.sql to your version control for the project.
  • Create tables manually, or with pgAdmin 4. With pgAdmin 4 you create right-click a table and generate the create table SQL script.
  • Turn off migrations for each model in Django:
class MyTable(models.Model):
    my_table_id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=256, blank=False)
    tag = models.CharField(max_length=256, blank=False)

    class Meta:
        managed = False
        db_table = 'account'
  • Disable migrations for each app that doesn’t use them in settings.py (as well as for the existing entries) in MIGRATION_MODULES, for example:
# Migration modules

MIGRATION_MODULES = {
    'my_app': None,

    'auth': None,
    'account': None,
    'contenttypes': None,
    'default': None,
    'sessions': None,

    'core': None,
    'profiles': None,
    'snippets': None,
    'scaffold_templates': None,
}

See also: Django Books