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 1v29Gh-000lsj-0W for pgsql-general@arkaria.postgresql.org; Fri, 26 Sep 2025 14:17:51 +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 1v29Gf-0021Yt-2x for pgsql-general@arkaria.postgresql.org; Fri, 26 Sep 2025 14:17:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v27P4-0014l9-Mk for pgsql-general@lists.postgresql.org; Fri, 26 Sep 2025 12:18:23 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v27P3-000DUW-0a for pgsql-general@postgresql.org; Fri, 26 Sep 2025 12:18:23 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-57b35e176dbso2536499e87.1 for ; Fri, 26 Sep 2025 05:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758889099; x=1759493899; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=jveOQoTV2ikrpADiXtdqqWNltB5ZQN6SMJba4RGB7MA=; b=VzYcnndS6ELKjJGTENFeQYH/ZXuXTABEOXdyMxe8h7KC4D63XJFlKYca2MA66NGtgF BKYfs1fubX/aTUys0u7R7X6OxbGZZhz9wXp45DaJzceMM76JuUYjn3Ck8AEEQSVInzX/ /GtWP1yw29vVq+VDiAk2sEvMsmIvKO9qmjS2AZ4SXP11/VAgrHJtf/211mfim77c9sAh 7TY200D8nM978noLWpcMHX0qN+F/DKjWgWSEOU2XSAxsqTSH0CGfLfWsWsyys0twFtX5 8HijQdXtTxUA3eOFpSiSu7Hty2GRLt6OIASlg1hahxW6P8gw6qUddfrOBR99jfoxqtSD sDZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758889099; x=1759493899; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jveOQoTV2ikrpADiXtdqqWNltB5ZQN6SMJba4RGB7MA=; b=B3xDjC+oFCCRoUz6mg5FFk8Ak0J156N2iTYgpupwfVD9RdA3ORWeOR7vrI/3y40kUL kmTcIWpFRh7JwFd78W1pN0MBJoxw3VXq/2h61SBs/4ttns/PMljbjYXvlnbNDiDJkpf8 1RE51h1Uh/U52c86NnVbsr0ZZloZmqGQqlX1phB1ctioCEA31dbwZhnxKtNq2NN3sqhr wsevvZ/7mTLoWNeStbk5RFOAnDqLMb6IBHgUUDNtFh72cX+eAjzRTinlXcu1O7l6zvpp TiQiOQJ9dFrn10TyL1A4sjI+FLY8MGS7fVd4ezMTxGOlY8roS0go+Oku7cBwvZNXlztF IhZg== X-Gm-Message-State: AOJu0Yzeqrm30bBp7enzKeeuBaY84Hq7sUf2R1x5xe+dclbekFAqg8XF ueKMbeYePdjw0DDIkUZjetAD/feOjlSQnXKW0vQqZNqUN6Oc8B7Q50i4duNfgdw1u69Cmb4X8kz CIwG6G1S+TAya8JC3LaOVm8dZRayVvYPJ5OW70c4= X-Gm-Gg: ASbGnctaMvetFBvDRxHhI3iqB6YDJq1UtpWZaFjqjmfi7bInwA0tbt04wDqgjao/rSt Pzt2QEGBxDOHknfCgyhPbKvUcEGbouGjS5Z/JgKnYcs/ybIZ5J6jR5tFBBe3ujY+9FTNWnX74AU 6lp3552MEo0xIrD/cFWG/GR1Ge0i8AS/qNH9XMhw2TFLNEm9rQW2+l9aDauwzGWWLoPfbkwy/q1 tTjqJkbA4CyBLkrGDqq4JJgu6mFHEkpsYyW4Nt+a7oBHCGp X-Google-Smtp-Source: AGHT+IHVD/xGjQpZ4xYfRgU7cRlcd0+Nhr698vEih61ZuIlj899xTnfHWtxlJdslUVEj78q3Am3Pz7xntsBWwLhI93Q= X-Received: by 2002:ac2:51ce:0:b0:57a:4356:6fdb with SMTP id 2adb3069b0e04-582d2299c6amr1938368e87.21.1758889099244; Fri, 26 Sep 2025 05:18:19 -0700 (PDT) MIME-Version: 1.0 From: Ashish Mukherjee Date: Fri, 26 Sep 2025 17:48:07 +0530 X-Gm-Features: AS18NWDxJsMeFEkbLhZ1UGCHU979B_l58iC56oB50CKmBqS5pdPG2kR8KeR37YA Message-ID: Subject: Downgrade pgsql 17 to pgsql 12 question To: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="000000000000f5bb41063fb347c5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f5bb41063fb347c5 Content-Type: text/plain; charset="UTF-8" Hello, I have a strange requirement to downgrade from pgsql 17 to pgsql 12. This is because we found in production certain incompatibilities between both versions for our database. It should have been caught in testing but was not. The clean way seems to be text file dump and restore but this would be too huge and too slow for our database of 3T. If I use pg_dump v17 and then restore with pg_restore v 17 on a pgsql v12 database, is there any risk? I tried a small test with a bunch of tables and it worked, but am wondering about the pitfalls. I am restoring from the directory format dump. When I do dump/restore like this for a test table, I get the following errors during restore but the table gets restored fine. pg_restore: error: while PROCESSING TOC: error: pg_restore: error: pg_restore: from TOC entry 17168; 1259 58572315 TABLE pkgs s14 pg_restore: error: pg_restore: pg_restore: pg_restore: from TOC entry 17168; 1259 58572315 TABLE pkgs s14 pg_restore: error: pg_restore: from TOC entry 17168; 1259 58572315 TABLE pkgs s14 pg_restore: error: pg_restore: from TOC entry 17168; 1259 58572315 TABLE pkgs s14 error: from TOC entry 17168; 1259 58572315 TABLE pkgs s14 pg_restore: warning: errors ignored on restore: 2 pkgs is the table and s14 is my database Any input would be appreciated. Regards, Ashish --000000000000f5bb41063fb347c5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I have a strange requirement to = downgrade from pgsql 17 to pgsql 12. This is because we found in production= certain incompatibilities=C2=A0between both versions for our database. It = should have been caught in testing but was not.

Th= e clean way seems to be text file dump and restore but this would be too hu= ge and too slow for our database of 3T. If I use pg_dump v17 and then resto= re with pg_restore v 17 on a pgsql v12 database, is there any risk? I tried= a small test with a bunch of tables and it worked, but am wondering about = the pitfalls. I am restoring from the directory format dump.

=
When I do dump/restore like this for a test table, I get the fol= lowing errors during restore but the table gets restored fine.
pg_restore: error: while PROCESSING TOC:
=C2=A0error: pg_re= store: =C2=A0error: =C2=A0 pg_restore: =C2=A0from TOC entry 17168; 1259 585= 72315 TABLE pkgs s14
pg_restore: error: pg_restore: pg_restore: pg_resto= re: =C2=A0 from TOC entry 17168; 1259 58572315 TABLE pkgs s14
pg_restore= : =C2=A0 error: pg_restore: from TOC entry 17168; 1259 58572315 TABLE pkgs = s14
pg_restore: error: pg_restore: from TOC entry 17168; 1259 58572315 T= ABLE pkgs s14
error: from TOC entry 17168; 1259 58572315 TABLE pkgs s14<= br>pg_restore: warning: errors ignored on restore: 2

pkgs is the table and s14 is my database

Any in= put would be appreciated.

Regards,
Ashis= h
--000000000000f5bb41063fb347c5--