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 1mj9I4-0001TG-0s for pgsql-admin@arkaria.postgresql.org; Sat, 06 Nov 2021 00:10:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mj9I0-0002Vr-GC for pgsql-admin@arkaria.postgresql.org; Sat, 06 Nov 2021 00:10:32 +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 1mj9I0-0002Vi-4P for pgsql-admin@lists.postgresql.org; Sat, 06 Nov 2021 00:10:32 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mj9Hx-0001Ve-2I for pgsql-admin@lists.postgresql.org; Sat, 06 Nov 2021 00:10:31 +0000 Received: by mail-ot1-x32e.google.com with SMTP id t21-20020a9d7295000000b0055bf1807972so7328433otj.8 for ; Fri, 05 Nov 2021 17:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=SngAvjOWhRnSdp4josb0ISau2HNnRj5sLl1a8b7X2h0=; b=O9kvHVngXCR37GQGlOrsOeYvEZvLkQrQyDN4cQwyuByxt4V0EUqYZNw0mTqKAE8wNj MlpKqA+dlW1YlZzVZpvQvVaYvktLFq69hk0Fn9+nkUWSCuTY4wKFmvFLQvXYC3Mb/xhk aApE5doNdGpc5OXRfm/5dH98S0utl54nRk+l0r3YKQwfpH5vnslDRY+9nnqQgSvx/vFg sgyvHq1cQrYlbTqDhL4qxd123qdzops5VbjpugwDBwBy4SOX1iO6tLrPP4fQzrexI8dF 89sO4ZKWpSOHNiWxnW+pdj20rHRRtKZ2/AaTxCxGW6yyNSWfhiKe/VMH8x8rGGGAq8HG xD/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=SngAvjOWhRnSdp4josb0ISau2HNnRj5sLl1a8b7X2h0=; b=JFPyVY75OVb/1vJd3TW4IYr3L5UWXXXHkGVC34OztXlD1ViDsX80lYrOAhGEvwqr1P eHdGBKkKmgkbnoNRDTWfo9cV7YlaMCNLdZaQVSLNQG2zQuOVn4GTrlF53UwNGlnyyX48 vm2LtU36BSFzCDn54BOxYl4wiRmoQD04aeKx6degEmEebdvwQZ6+gSAqjoSL5Hv4fG31 oEpVSIxeKRek7C9mIKIzS5m933Mqjtxrftb5Pyndz0Y5npRN2L8LXK2EUgLl8H8EgenB xXD0tCgp8Rh+uNR7kbvXsHheXu7JeLVzGPatsy110P7Z0EDS61KSqudZZyOYknDqdF9Z qjhw== X-Gm-Message-State: AOAM530qLEWDo5+pwdcL2HRxTar69y3/uFYyf33rwG8KBnL7i+245kT1 cPj9cQVU7dEZQDy08IWcu4Q3GpFbSbU= X-Google-Smtp-Source: ABdhPJxxYwnLbB/3PwQ5xkYPvHC3KdhvGAiTu+qVZyBaz7cyswIixDAuJrUVdzTKgXHAOe7XY5NvSA== X-Received: by 2002:a05:6830:1215:: with SMTP id r21mr805752otp.210.1636157426867; Fri, 05 Nov 2021 17:10:26 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id 3sm3190320oif.12.2021.11.05.17.10.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Nov 2021 17:10:26 -0700 (PDT) Subject: Re: pg_dump weirdness To: pgsql-admin@lists.postgresql.org References: <492eb0ca-d43e-e732-61bd-17293fff431a@gmail.com> <61A06E76-7897-4603-B6B4-CA67BBFC2547@sqlexec.com> From: Ron Message-ID: <39a74cae-6e42-d55a-229e-03cf0f64caa4@gmail.com> Date: Fri, 5 Nov 2021 19:10:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <61A06E76-7897-4603-B6B4-CA67BBFC2547@sqlexec.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk That's correct.  It's backward compatible, not forward compatible. On 11/5/21 3:59 PM, MichaelDBA@sqlexec.com wrote: > You cannot use a newer version of pgdump to export and then insert it into an older version of PostgreSQL if I am understanding you correctly. > > Sent from my iPhone > >> On Nov 5, 2021, at 3:10 PM, John Scalia wrote: >> >> I ran a pg_dump for a colleague, as he needs to move some data into a new database. I ran the command as: >> >> pg_dump -h original_server -t original_schema.table_name -U user -W dbname > table_name.sql >> >> after the dump was completed with no errors, I went into the target instance, and truncated the target table. I also had to do a sed operation to change the schema name in the dump file for the schema in the target. I verified that sed properly modified the file. Now, after all this, I used: >> >> psql -h target_server -U user newdbname < table_name.sql >> >> This loaded with a handful of warnings, like table already exists, the sequence already exists, and some privileges could not be set. After those warnings it ran for more than 1/2 hour to load the table. The problem is that after this was all done. I went back into the target instance, and checked the newly loaded table. There was nothing in it, i.e., 0 rows. >> >> The pg_dump and the output file claim the pg_dump version was 12.6, while the server it ran against was 11.9. Both instances are AWS RDS Aurora-PostgreSQL ones. Any ideas why there was no data in the table? Other than on inputting it using psql, there were no other errors. >> >> --jay >> >> >> > > -- Angular momentum makes the world go 'round.