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 1mk5n1-0006Wt-CT for pgsql-admin@arkaria.postgresql.org; Mon, 08 Nov 2021 14:38:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mk5mz-0000p3-Re for pgsql-admin@arkaria.postgresql.org; Mon, 08 Nov 2021 14:38:25 +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 1mk5mz-0000ou-Ei for pgsql-admin@lists.postgresql.org; Mon, 08 Nov 2021 14:38:25 +0000 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mk5mw-0002BO-Vj for pgsql-admin@lists.postgresql.org; Mon, 08 Nov 2021 14:38:24 +0000 Received: by mail-qk1-x734.google.com with SMTP id bq14so15635990qkb.1 for ; Mon, 08 Nov 2021 06:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=8nEdK4FmDy0ExEMMw9RZw1T2shhEayepnfF31Dy0fSU=; b=cs+y14LOJYHrcD9IJmkmOZGOCjODDoxfI7JGkp3FTY5gj2SSyEe1srzTF7ahhAfa/K sTairSe/IinNQxdFBX2Dg9ZFzjyfmqhLgbSNJ5WkjG6gxLP3JCOEtKw+K4iqRxpnRTEV eTAbHRVriORRWZaldYMO0vTCdpO/REdMZGyd+VO6fMQBemWLS1b9zONa8Tp0N5yBWTAO ucSlfczj+xAsBolCrpNQx6qbSodtyXkmUdrK+LKfnj/zyyaJ4o8cfp6FmejAfGvIlQZE 0MV9/kLkJpnnNd0G0fjkMexb+dHHORNR+eDW8DI8PG0+674PDfPAehYHe7XiI9EdaOn2 8Apw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=8nEdK4FmDy0ExEMMw9RZw1T2shhEayepnfF31Dy0fSU=; b=DDrF0pV0vi6QyDxqM+4vq/C5+fvVM2TxFNAi75lBV75faLg0LpiRlcNqGjhkEOcYUu JrofvLFEW0a566JAHauFVkTNkp2OE3XN5ev3JeNnl4guhKsPOtrH+o12GaMG+YRDxEqv +vTON71eIItKI6W1g3f0VEcsmfAxfsobrCCaA8F0jZ26fsg/EVUmPPhMeQzv65WC5ixE ssILffyMQ/brHAaHBHo8oFqqjU4NfUUg0uAKKQsb767gfssiT6MLyH9qkzrHlZRvOGg5 zKLtxktel+hwLu3A5Wdw9GOwjHeMK8iL9oGWxyY68Z/j2+pZLlWCwYw9nbDvugzJi0r0 ySMA== X-Gm-Message-State: AOAM530L3KLN5bM1SsNKY4KhJ/Qb/VaO8Q7753eC+wTZY2LgExWbYWRX Jv25w0ij8FTUzC+RBfLJ6UHl+NIocSM= X-Google-Smtp-Source: ABdhPJwxVF+IKWbWaiolj+474jzGM5tA7CQBl5QLj97gyfAUrSQDNwThNTA7xaDTPyyk1gAJprS6sA== X-Received: by 2002:a37:a10b:: with SMTP id k11mr32907qke.63.1636382300816; Mon, 08 Nov 2021 06:38:20 -0800 (PST) Received: from [192.168.254.67] (h0.171.29.71.dynamic.ip.windstream.net. [71.29.171.0]) by smtp.gmail.com with ESMTPSA id d6sm2806551qtq.15.2021.11.08.06.38.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Nov 2021 06:38:20 -0800 (PST) Subject: Re: pg_dump weirdness To: MichaelDBA Cc: pgsql-admin@lists.postgresql.org References: <492eb0ca-d43e-e732-61bd-17293fff431a@gmail.com> From: John Scalia Message-ID: Date: Mon, 8 Nov 2021 09:38:19 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------1E8AD3C4EC4D3974667225D4" Content-Language: en-US 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. --------------1E8AD3C4EC4D3974667225D4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit I determined what the problem was this morning, there was one error about a foreign key violation, which I did not really see earlier. so I removed two foreign key constraints from the target table. The load then worked properly, and some 600k records are now loaded. On 11/6/2021 9:25 AM, MichaelDBA wrote: > 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 > > > --------------1E8AD3C4EC4D3974667225D4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

I determined what the problem was this morning, there was one error about a foreign key violation, which I did not really see earlier. so I removed two foreign key constraints from the target table. The load then worked properly, and some 600k records are now loaded.

On 11/6/2021 9:25 AM, MichaelDBA wrote:
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



--------------1E8AD3C4EC4D3974667225D4--