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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "egil(at)wp(dot)pl" <egil(at)wp(dot)pl>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <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 15:27:57
Message-ID: CAKFQuwZiqMEhp8aa0ja9K9F5Q_hobdn0OryNecrepD+eu4+etA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Friday, November 20, 2026, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 19927
> Logged by: Maciej Nux
> Email address: egil(at)wp(dot)pl
> PostgreSQL version: 16.15
> Operating system: Ubuntu
> Description:
>
> Hi. I encountered a compatibility issue while restoring a plain SQL dump
> using PostgreSQL 16.
>
> Created sql dump on one machine with 16.15 and wanted to restore on test
> machine that happens to be on 16.3 at the moment.
> .
>
> 1. Is there any supported option to prevent `\restrict` and `\unrestrict`
> from appearing in plain SQL dumps?
> 2. What is the recommended way to ensure compatibility when generating and
> restoring plain SQL dumps?
>

This failure mode seems like one we’d be willing to live with. You can
edit the sql file manually if you really need to restore it on an older
release (I’m assuming this to be true). The supported thing is to never
expect a newer version to produce output an older version can read. Even
for a minor release though we do usually avoid this for
non-security-related changes.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2026-11-20 15:29:04 Re: BUG #19927: PostgreSQL 16: SQL dump adds experimental/incompatible options like \restrict
Previous Message Tom Lane 2026-11-20 15:25:01 Re: BUG #19927: PostgreSQL 16: SQL dump adds experimental/incompatible options like \restrict