Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptQGd-0004NG-Us for pgsql-pkg-debian@arkaria.postgresql.org; Mon, 01 May 2023 09:56:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ptQFd-000193-4S for pgsql-pkg-debian@arkaria.postgresql.org; Mon, 01 May 2023 09:55:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptQFc-00018p-UY for pgsql-pkg-debian@lists.postgresql.org; Mon, 01 May 2023 09:55:20 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ptQFZ-0068bq-A4 for pgsql-pkg-debian@postgresql.org; Mon, 01 May 2023 09:55:20 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1482:3660:2ae7:2867:64d8:87dc]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 4Q8z8z6PQlz3F5h; Mon, 1 May 2023 11:55:15 +0200 (CEST) Date: Mon, 1 May 2023 11:55:15 +0200 From: Christoph Berg To: Justin Pryzby Cc: pgsql-pkg-debian@postgresql.org Subject: Re: postgresql-common: use latest version of pg_dump/restore Message-ID: Mail-Followup-To: Christoph Berg , Justin Pryzby , pgsql-pkg-debian@postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Justin Pryzby > Maybe I'm misundertanding your diagram - did you mean this ? > > > source server version <= pg_dump <= pg_restore <= target server Sorry, yes of course. > I think you're considering the issue where pg_dump support is dropped > for very old versions - that'd be something that's like ~10 years old. > For example if someone has a pg9.1 server, and then installs pg15 > clients, which dropped support for v9.1. If you use pg_dump X on an older version Y, it will still emit all the SET commands that are applicable for version X: -- Dumped from database version 9.3.25 -- Dumped by pg_dump version 16devel (Debian 16~~devel-1.pgdg+~20230428.1656.g81eaaf6) SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; If you then try to feed that back to version Y, it will raise errors. $ pg_dump -s | psql SET Zeit: 0,229 ms SET Zeit: 0,111 ms FEHLER: 42704: unbekannter Konfigurationsparameter »idle_in_transaction_session_timeout« ORT: set_config_option, guc.c:5229 Christoph