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 1u7f7e-003UOd-W1 for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 18:47:03 +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 1u7f7c-00901z-EB for pgsql-general@arkaria.postgresql.org; Wed, 23 Apr 2025 18:47:01 +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 1u7f7c-00901n-2Y for pgsql-general@lists.postgresql.org; Wed, 23 Apr 2025 18:47:00 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u7f7a-001a2C-1G for pgsql-general@lists.postgresql.org; Wed, 23 Apr 2025 18:46:59 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-3105ef2a070so2421641fa.2 for ; Wed, 23 Apr 2025 11:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745434015; x=1746038815; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=z1B+C8vFDlb2TjRkGe5dzLhbS2fyyBlNRuokZqhhv+0=; b=DnthXQdVAuitkTSreihjjYlVJORWKZpVp7eCxZTBVPAmCuxfFyhS55sRMS1t1l0w9V 62EGXkapXio5J5WMbhv1T0N3GTAVSQfUpqsuo/9TjNjbSZQAmEc+YreSNB8fGGT8Duuj jxI+N3aWtVZ9achPjAwSysOb3ONdrR6dU1d8dpLia2t0Kq7sRBxw/imwCFffklYVfERd lufnThhZfaMnEOFspCqWH986Lj+AAjNmpO5Pz+Th3yhQV0mUU15hgPLSGtFSa70LniCc lIh+ThaaOrpTCntevyKSVYqdAM0+ageG1f+AvLJEhawBcAyL1VcJVYwFkGJJSwTPHuVC odYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745434015; x=1746038815; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=z1B+C8vFDlb2TjRkGe5dzLhbS2fyyBlNRuokZqhhv+0=; b=JU6IXDtYEt1u4Rkm8i0ndQ21jk7CU2DitwfLlGdLLobK2dok1tQ0hAsbxvdkE6Ny2W ouKMfABF/7nYYUrwNi/CKaR+Do9KAzkyOL11hie0aYS/2EQ+usSaBeAIhwE46ctnoLD0 s0jyTwTo50M6DbEknqPRypGOnBy2saZX+In51wLv3n9OoytpY25VToI6W5V/towCjcA9 JIQB6E4/u4eNbm6ZOodTFrVegL2qigW3fKMA7Bzsp9jwvMjPjSUCZleku5x7KnF+5Y4D xZo14Kr6ERnc6JFL37Dwjgi0A8vRQc/vk23PaNfUMMMbSDL7ibMTrD4/f/Mgeu72vfQu EyJg== X-Gm-Message-State: AOJu0YxlWM34s7UqOdfph9QVuBTvfJuKZLuCqpau9BLZLRRbSntA4avM KGLHRJTk4y3gePKFBB0+YqRpbEc6OMsb4N4qDJcXrEd32a/ObTa8wgZxuPT5i/8o0nIFcmdrH3l pCcAIrWneiovRdz4UOcBIwMYWdX244scq X-Gm-Gg: ASbGncuh1p2UavxGc7TZ9/Kha4LfLmDM+Kj7gepHSSemjLZB/3+PZ6M66PepfGX3fuU Q9R0RhT2Mx6LjoG8Z1JAcyqWJ0EqFMgMrc/T1HmP9Es1Lp6RnleO6o2jUU0wCZeXqbdBAiq3rk/ pt/GYRtB/KWemyCMhrZgRL0Rzcp/tGGYO6 X-Google-Smtp-Source: AGHT+IHY9dcRK7PS6oJqc5/yeY4wb1izsIlB0gXWxg8O3V2LrI3Jf4rL4c1h0kUQiPgPDjllEA8qeA2VnNrijKa2BiU= X-Received: by 2002:a05:651c:1617:b0:30d:b89d:aafd with SMTP id 38308e7fff4ca-3179facaccdmr198121fa.31.1745434015141; Wed, 23 Apr 2025 11:46:55 -0700 (PDT) MIME-Version: 1.0 From: Pawel Veselov Date: Wed, 23 Apr 2025 20:46:39 +0200 X-Gm-Features: ATxdqUGg5YGwYp45M85TfNSTC2L40vY8CnBzc0lEHq0qBQqkwKYQ331SE7Wx_YA Message-ID: Subject: Dump version issues To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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) * 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.