From: | John Scalia <jayknowsunix(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | pg_dump weirdness |
Date: | 2021-11-05 19:10:21 |
Message-ID: | 492eb0ca-d43e-e732-61bd-17293fff431a@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | MichaelDBA@sqlexec.com | 2021-11-05 20:59:02 | Re: pg_dump weirdness |
Previous Message | Laurenz Albe | 2021-11-05 05:14:54 | Re: Encoding error during database restore |