From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: pg_dump weirdness
Date: Fri, 5 Nov 2021 19:10:24 -0500
Message-ID: <39a74cae-6e42-d55a-229e-03cf0f64caa4@gmail.com> (raw)
In-Reply-To: <61A06E76-7897-4603-B6B4-CA67BBFC2547@sqlexec.com>
References: <492eb0ca-d43e-e732-61bd-17293fff431a@gmail.com>
<61A06E76-7897-4603-B6B4-CA67BBFC2547@sqlexec.com>
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 <jayknowsunix@gmail.com> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: pg_dump weirdness
In-Reply-To: <39a74cae-6e42-d55a-229e-03cf0f64caa4@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox