Re: BUG #19927: PostgreSQL 16: SQL dump adds experimental/incompatible options like \restrict

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Maciej Jaros <egil(at)wp(dot)pl>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19927: PostgreSQL 16: SQL dump adds experimental/incompatible options like \restrict
Date: 2026-11-20 20:17:34
Message-ID: AB7B6B1E-D78F-4DC7-9D84-8933E9327646@thebuild.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On Nov 20, 2026, at 11:56, Maciej Jaros <egil(at)wp(dot)pl> wrote:
>
> Well if the minor versions have breaking changes then how am I supposed to upgrade without making a backup? You seem to saying contradicting things.

I'm not quite sure what you mean here.

You don't need to do a dump/restore to upgrade from one minor version to another within a major version; you just restart on the newer binaries. I don't believe there's ever been a PostgreSQL minor version upgrade that required anything else (except possible post-upgrade maintenance activities like rebuilding certain indexes).

The situation that you are encountering is not an upgrade: it's a downgrade from a higher minor version to a lower one. PostgreSQL has never guaranteed that a dump created on a later version, minor or major, will restore without any errors on an earlier version.

If you need to do this routinely (restore a dump taken on a later minor version on a server running an earlier minor version), you have some options:

1. Process the dump file to removes newer features that won't restore without error on the earlier version.
2. Just ignore the error, as Tom suggests.
3. Don't use pg_dump at all, but just move the underlying files around (assuming compatible architectures, etc.).

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-11-20 20:53:05 Re: BUG #19924: unrecognized node type in create_plan_recurse: UNION, LIMIT, json_populate_recordset, inheritance
Previous Message Tom Lane 2026-11-20 19:56:17 Re: BUG #19927: PostgreSQL 16: SQL dump adds experimental/incompatible options like \restrict