Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u7fUn-003cxh-Vg for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 19:10:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u7fUk-009JWf-VV for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 19:10:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u7fUj-009JVs-SP for pgsql-general@lists.postgresql.org; Wed, 23 Apr 2025 19:10:55 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7fUh-001aDa-2m for pgsql-general@lists.postgresql.org; Wed, 23 Apr 2025 19:10:53 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id E08BF254026C; Wed, 23 Apr 2025 15:10:50 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 23 Apr 2025 15:10:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1745435450; x=1745521850; bh=T2h9wZmwzxl0IcO07Y9irQcoIHyqL1c/Jv1rtBI9otI=; b= llj+r7ZD6yiN+V+tSQIkZC11wOQYeBHzbogzhBzrWg7ascy2mUIChxTsJSOXMvAi sUBZKC0twqFtcXAdYGPD6X/BYHUb1hE3jxYBjYFvW1zk6mC30z8w9UcEouS9sacv mfxbBm4a0XWPwizHuMrK2bOltv5CLCAhLyWXaYcn0OdhVZyR1pSmOc5hAmJadsAL ypKduMaef6NJOp7vJXqAjsjfscD6WrmhCc0JDqcf5ZUXLrGyYFlSieoqXnBY+p0c l0cS2MM1zKq6on0CoYCfP1PEVorZzKTaVqdtevTbCcIDqHOl00wUQYEIH/Fu9k6g yZcVe7x1daYSDM8mTZiusg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1745435450; x=1745521850; bh=T 2h9wZmwzxl0IcO07Y9irQcoIHyqL1c/Jv1rtBI9otI=; b=ax8hmCk3zZghWWHHy I/2ktK0Frzdjs/kFkSZaEuV5KxfZs9A+TNhfy6hffU+hYVArzwXMLNmTyEXJWkXu zW75zPdgGmul7bS4XEYyokyFNJ5aSrSGrCoENgNjeSSGzTf1fjFxLXsompFaqzN+ TXyen5p9E73Mm/EZI9HRi7pXSRIw57F1lK39yFOGTiG0NKzJg8ixlUImSsNho69x Bt2jz3TGe6bNjpPmsthoqDOPKOOnocuJ/7Q9rjpKn8l5hQJ4G+JSE50RDoxUcHjv R4w+zv8VZjtvW9DJZOzK/noJt0RvC0EuxBVezZvnlAlYgCW5ezdSB/jisaCaG2Gj NPa6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgeejgeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeeivdfhieehheegueei leejieettdejhedugeefleekvdelkeehtdfgiefffeekudenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegr khhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuth dprhgtphhtthhopehprgifvghlrdhvvghsvghlohhvsehgmhgrihhlrdgtohhmpdhrtghp thhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrd horhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Apr 2025 15:10:50 -0400 (EDT) Message-ID: <70afbbc7-9a18-4a61-82c8-3d4c12de0dc2@aklaver.com> Date: Wed, 23 Apr 2025 12:10:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Dump version issues To: Pawel Veselov , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/23/25 11:46, Pawel Veselov wrote: > Hello. > > Was trying to import a database from a cloud deployment, and ran into this. > > Exported the database with: > * pg_dump (PostgreSQL) 12.20 (Ubuntu 12.20-0ubuntu0.20.04.1) Are you sure about the above? Version 1.16 is what you get from a Postgres 17 dump file. If the client OS you are using is Ubuntu and you used the postgresql-common install it may dump using the latest installed version of pg_dump. If you have Postgres 17 installed then that will be used. To specify a pg_dump version do something like: pg_dump --cluster 16/main Assuming you have the default main cluster created. pg_lsclusters will help show what Postgres instances are installed and what the cluster names are. > * RDS PostgreSQL 12.19 on x86_64-pc-linux-gnu, compiled by gcc (GCC) > 7.3.1 20180712 (Red Hat 7.3.1-12), 64-bit > > This produced a dump file of version 1.16, at least according to 'file'. > > Trying to import the same dump on another (Fedora) machine, tried: > * pg_restore (PostgreSQL) 12.22 <- from PGDG > * pg_restore (PostgreSQL) 16.8 <- from Fedora > > Both complain that they can't process the dump because dump version > 1.16 is not supported. > Both packages are latest from their respective repositories. > > I'm not sure whether the server has any say in the version of the dump > file, I assume it doesn't. > > So, how come older software (according to versions) produces dump > files with a greater version > than the newer software can understand? Is this Ubuntu package > maintainers messing things up? > > Given a pg_dump, it would be nice if its "-V" output would say which > version of the dump it would produce, > and a pg_restore - what's the max (and min, if that's a thing) version > of the dump that it will accept. > That would be just super-helpful in finding the right combination of tools. > > I ended up running PGDG's 16 pg_dump ((PostgreSQL) 16.8 (Ubuntu > 16.8-1.pgdg22.04+1)) > on Ubuntu, which produced a 1.15-0 dump. > > Thank you, > Pawel. > > -- Adrian Klaver adrian.klaver@aklaver.com