Re: pg_dump weirdness

Поиск
Список
Период
Сортировка
От MichaelDBA@sqlexec.com
Тема Re: pg_dump weirdness
Дата
Msg-id 61A06E76-7897-4603-B6B4-CA67BBFC2547@sqlexec.com
обсуждение исходный текст
Ответ на pg_dump weirdness  (John Scalia <jayknowsunix@gmail.com>)
Ответы Re: pg_dump weirdness  (Ron <ronljohnsonjr@gmail.com>)
Re: pg_dump weirdness  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
You cannot use a newer version of pgdump to export and then insert it into an older version of PostgreSQL if I am
understandingyou 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
hadto do a sed operation to change the schema name in the dump file for the schema in the target. I verified that sed
properlymodified 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
couldnot be set. After those warnings it ran for more than 1/2 hour to load the table. The problem is that after this
wasall 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
instancesare AWS RDS Aurora-PostgreSQL ones. Any ideas why there was no data in the table? Other than on inputting it
usingpsql, there were no other errors. 
>
> --jay
>
>
>




В списке pgsql-admin по дате отправления:

Предыдущее
От: John Scalia
Дата:
Сообщение: pg_dump weirdness
Следующее
От: Ron
Дата:
Сообщение: Re: pg_dump weirdness