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 1mjLhb-00026d-Mp for pgsql-admin@arkaria.postgresql.org; Sat, 06 Nov 2021 13:25:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mjLhX-0002yW-PT for pgsql-admin@arkaria.postgresql.org; Sat, 06 Nov 2021 13:25:43 +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 1mjLhX-0002yN-Fw for pgsql-admin@lists.postgresql.org; Sat, 06 Nov 2021 13:25:43 +0000 Received: from mout.perfora.net ([74.208.4.197]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjLhV-0001aT-6P for pgsql-admin@lists.postgresql.org; Sat, 06 Nov 2021 13:25:43 +0000 Received: from [192.168.1.167] ([98.169.214.209]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LufPq-1maW1o3WIS-00znht; Sat, 06 Nov 2021 14:25:36 +0100 Subject: Re: pg_dump weirdness To: John Scalia Cc: pgsql-admin@lists.postgresql.org References: <492eb0ca-d43e-e732-61bd-17293fff431a@gmail.com> From: MichaelDBA Message-ID: Date: Sat, 6 Nov 2021 09:25:33 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.51 MIME-Version: 1.0 In-Reply-To: <492eb0ca-d43e-e732-61bd-17293fff431a@gmail.com> Content-Type: multipart/alternative; boundary="------------5823DCD67CE6FA28EB305C85" Content-Language: en-US X-Provags-ID: V03:K1:QFH3QN4mHyEvcev0McyzGzydsiQOe/+ZgDeWjJRiSuluxgXzM4c 64/SpvVtMJCSg0qVif/5oZ1JYc0ayRYmwZutYAfOkHCIZPxcxa/4a2VEt5QDLHdM6K+r2RD MSKd3WgrwIpWgcQsYGsBSV9dalnvmr/XvBgtf/QE/QU60W07uuyuMZ+UJ5tDNXbZ6cLizoH XrWmOZRITDrz0H62/WXsQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:MpqTpAgOg7I=:aRO2gj5ZF+r672/+XaA7gG WVE5MgtU1ENH3+tLbjWE/5Wi5RZGBDGM3TGlpO6DZr7qVTdrvmn4EFCyuiWSQIjL0WwD8Cd6C vNTE5RbNSRpnewTA2FtJ6WGmIFlecFQS2BCLowSqrZk59aRT3TBNAQmiNDN9OUICHiCqYDvlo UKGO9g4c+qJMhXAf93IV82gKoFHmgD034YqfD3nu6PelaJpxaBWye/p//CzuU59mZ++8HHwwr NjZH4HwX/K9phhnYbKDUQIDNZFYfAvUwzk/H6Gp6d3P65ZY75bYAaBVhoiuho/ULJ/95cOA9t G/6YsFMow0u23ZZEzMnKSI/IygeP+lkEKa55oyMJKmUkdBYpXUNKgzrKnkyctooT6daA29M73 HdHl71ABxqLsKhtTJ0OpC5lSkm/uEEncfWTdNc2w4/olE072JlcPxKSVCAdZvpA0JwFJ3t+LM x9zJ8My/QdhSpgOzPHXrNiHqau4TmZa8Qfe7Qc4dgUTBWEVqlGg4dZcrkxT7czbPfYn/8dvrK RKiYMiXOH3ybDVJMH32jLxjS0h77HffFueS/PSIiIgfFrJP98liTnGJi23+TpAJcguEKH2HtR nS2DqeC6o5wDmq0a7Hp0pHh6CXa/77tr13NYrCcUGTMd7QHAER1m1uzB4dLZ7NBkFujRdV43x eCUa+/Gf9ev0E4pCNzueMLhSuVugGZfDzt+oGKCdaS65tODAGAX+IHrQBCq/g+MmEh9BsMTNM P23is6hwkArmkwvq List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------5823DCD67CE6FA28EB305C85 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit I think you are pointing to the wrong binaries. Use the absolute path to your pg_dump binary to make sure you are using the version you think you are using.  For example: /usr/pgsql-11/bin/pg_dump -h original_server -t original_schema.table_name -U user -W dbname > table_name.sql And for the target do the same for psql plus add the stop on error parm: /usr/pgsql-11/bin/psql -h target_server -U user newdbname -v ON_ERROR_STOP=1 < table_name.sql Regards, Michael Vitale --------------5823DCD67CE6FA28EB305C85 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit I think you are pointing to the wrong binaries.

Use the absolute path to your pg_dump binary to make sure you are using the version you think you are using.  For example:
/usr/pgsql-11/bin/pg_dump -h original_server -t original_schema.table_name -U user -W dbname > table_name.sql

And for the target do the same for psql plus add the stop on error parm:
/usr/pgsql-11/bin/psql -h target_server -U user newdbname -v ON_ERROR_STOP=1 < table_name.sql

Regards,
Michael Vitale



--------------5823DCD67CE6FA28EB305C85--